From e7e5cce7355f0d0224dabaa82022829f616efecf Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 13 Aug 2019 10:36:46 +0200 Subject: [PATCH] Polish contribution See gh-23457 --- .../web/reactive/config/EnableWebFlux.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebFlux.java b/spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebFlux.java index 8dd5ffd7fc2..cdd078783e2 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebFlux.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebFlux.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,7 @@ import org.springframework.context.annotation.Import; *
  * @Configuration
  * @EnableWebFlux
- * @ComponentScan(basePackageClasses = MyConfiguration.class)
+ * @ComponentScan
  * public class MyConfiguration {
  * }
  * 
@@ -45,22 +45,23 @@ import org.springframework.context.annotation.Import; *
  * @Configuration
  * @EnableWebFlux
- * @ComponentScan(basePackageClasses = MyConfiguration.class)
+ * @ComponentScan
  * public class MyConfiguration implements WebFluxConfigurer {
- * 
- * 	   private ObjectMapper objectMapper;
  *
- * 	   @Override
- * 	   public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) {
+ *     @Autowired
+ *     private ObjectMapper objectMapper;
+ *
+ *     @Override
+ *     public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) {
  *         configurer.defaultCodecs().jackson2JsonEncoder(
  *             new Jackson2JsonEncoder(objectMapper)
  *         );
  *         configurer.defaultCodecs().jackson2JsonDecoder(
  *             new Jackson2JsonDecoder(objectMapper)
  *         );
- * 	   }
+ *     }
  *
- * 	   // ...
+ *     // ...
  * }
  * 
*