From 73999567083b1c20cad1aa47393056c501882663 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Thu, 2 Feb 2017 11:25:54 -0500 Subject: [PATCH] Rename classes and methods containing "WebReactive" Issue: SPR-15190 --- ...va => DelegatingWebFluxConfiguration.java} | 16 +++--- ...bleWebReactive.java => EnableWebFlux.java} | 32 +++++------ ....java => WebFluxConfigurationSupport.java} | 32 +++++------ ...Configurer.java => WebFluxConfigurer.java} | 10 ++-- ...e.java => WebFluxConfigurerComposite.java} | 16 +++--- .../resource/AppCacheManifestTransformer.java | 2 +- ... DelegatingWebFluxConfigurationTests.java} | 56 +++++++++---------- ... => WebFluxConfigurationSupportTests.java} | 34 +++++------ .../DispatcherHandlerIntegrationTests.java | 4 +- .../BindingContextFactoryTests.java | 4 +- .../ContextPathIntegrationTests.java | 6 +- ...CrossOriginAnnotationIntegrationTests.java | 4 +- .../GlobalCorsConfigIntegrationTests.java | 4 +- .../JacksonHintsIntegrationTests.java | 4 +- ...estMappingDataBindingIntegrationTests.java | 4 +- ...pingExceptionHandlingIntegrationTests.java | 4 +- .../RequestMappingIntegrationTests.java | 4 +- ...pingMessageConversionIntegrationTests.java | 4 +- ...MappingViewResolutionIntegrationTests.java | 4 +- .../annotation/SseIntegrationTests.java | 4 +- src/asciidoc/web-flux.adoc | 2 +- 21 files changed, 125 insertions(+), 125 deletions(-) rename spring-webflux/src/main/java/org/springframework/web/reactive/config/{DelegatingWebReactiveConfiguration.java => DelegatingWebFluxConfiguration.java} (83%) rename spring-webflux/src/main/java/org/springframework/web/reactive/config/{EnableWebReactive.java => EnableWebFlux.java} (69%) rename spring-webflux/src/main/java/org/springframework/web/reactive/config/{WebReactiveConfigurationSupport.java => WebFluxConfigurationSupport.java} (94%) rename spring-webflux/src/main/java/org/springframework/web/reactive/config/{WebReactiveConfigurer.java => WebFluxConfigurer.java} (94%) rename spring-webflux/src/main/java/org/springframework/web/reactive/config/{WebReactiveConfigurerComposite.java => WebFluxConfigurerComposite.java} (85%) rename spring-webflux/src/test/java/org/springframework/web/reactive/config/{DelegatingWebReactiveConfigurationTests.java => DelegatingWebFluxConfigurationTests.java} (61%) rename spring-webflux/src/test/java/org/springframework/web/reactive/config/{WebReactiveConfigurationSupportTests.java => WebFluxConfigurationSupportTests.java} (93%) diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/config/DelegatingWebReactiveConfiguration.java b/spring-webflux/src/main/java/org/springframework/web/reactive/config/DelegatingWebFluxConfiguration.java similarity index 83% rename from spring-webflux/src/main/java/org/springframework/web/reactive/config/DelegatingWebReactiveConfiguration.java rename to spring-webflux/src/main/java/org/springframework/web/reactive/config/DelegatingWebFluxConfiguration.java index 6be4d79fc7..ba632e5ff3 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/config/DelegatingWebReactiveConfiguration.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/config/DelegatingWebFluxConfiguration.java @@ -30,23 +30,23 @@ import org.springframework.web.reactive.accept.RequestedContentTypeResolverBuild import org.springframework.web.reactive.result.method.HandlerMethodArgumentResolver; /** - * A subclass of {@code WebReactiveConfigurationSupport} that detects and delegates - * to all beans of type {@link WebReactiveConfigurer} allowing them to customize the - * configuration provided by {@code WebReactiveConfigurationSupport}. This is the - * class actually imported by {@link EnableWebReactive @EnableWebReactive}. + * A subclass of {@code WebFluxConfigurationSupport} that detects and delegates + * to all beans of type {@link WebFluxConfigurer} allowing them to customize the + * configuration provided by {@code WebFluxConfigurationSupport}. This is the + * class actually imported by {@link EnableWebFlux @EnableWebFlux}. * * @author Brian Clozel * @since 5.0 */ @Configuration -public class DelegatingWebReactiveConfiguration extends WebReactiveConfigurationSupport { +public class DelegatingWebFluxConfiguration extends WebFluxConfigurationSupport { - private final WebReactiveConfigurerComposite configurers = new WebReactiveConfigurerComposite(); + private final WebFluxConfigurerComposite configurers = new WebFluxConfigurerComposite(); @Autowired(required = false) - public void setConfigurers(List configurers) { + public void setConfigurers(List configurers) { if (!CollectionUtils.isEmpty(configurers)) { - this.configurers.addWebReactiveConfigurers(configurers); + this.configurers.addWebFluxConfigurers(configurers); } } diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebReactive.java b/spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebFlux.java similarity index 69% rename from spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebReactive.java rename to spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebFlux.java index dd84b55477..915d577a3f 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebReactive.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebFlux.java @@ -26,11 +26,11 @@ import org.springframework.context.annotation.Import; /** * Adding this annotation to an {@code @Configuration} class imports the Spring Web - * Reactive configuration from {@link WebReactiveConfigurationSupport}, e.g.: + * Reactive configuration from {@link WebFluxConfigurationSupport}, e.g.: * *
  * @Configuration
- * @EnableWebReactive
+ * @EnableWebFlux
  * @ComponentScan(basePackageClasses = MyConfiguration.class)
  * public class MyConfiguration {
  *
@@ -38,13 +38,13 @@ import org.springframework.context.annotation.Import;
  * 
* *

To customize the imported configuration implement - * {@link WebReactiveConfigurer} and override individual methods as shown below: + * {@link WebFluxConfigurer} and override individual methods as shown below: * *

  * @Configuration
- * @EnableWebReactive
+ * @EnableWebFlux
  * @ComponentScan(basePackageClasses = MyConfiguration.class)
- * public class MyConfiguration implements WebReactiveConfigurer {
+ * public class MyConfiguration implements WebFluxConfigurer {
  *
  * 	   @Override
  * 	   public void addFormatters(FormatterRegistry formatterRegistry) {
@@ -60,26 +60,26 @@ import org.springframework.context.annotation.Import;
  * 
* *

Note: only one {@code @Configuration} class may have the - * {@code @EnableWebReactive} annotation to import the Spring Web Reactive + * {@code @EnableWebFlux} annotation to import the Spring Web Reactive * configuration. There can however be multiple {@code @Configuration} classes - * implementing {@code WebReactiveConfigurer} in order to customize the provided + * implementing {@code WebFluxConfigurer} in order to customize the provided * configuration. * - *

If {@link WebReactiveConfigurer} does not expose some more advanced setting - * that needs to be configured consider removing the {@code @EnableWebReactive} - * annotation and extending directly from {@link WebReactiveConfigurationSupport} - * or {@link DelegatingWebReactiveConfiguration} if you still want to allow - * {@link WebReactiveConfigurer} instances to customize the configuration. + *

If {@link WebFluxConfigurer} does not expose some more advanced setting + * that needs to be configured consider removing the {@code @EnableWebFlux} + * annotation and extending directly from {@link WebFluxConfigurationSupport} + * or {@link DelegatingWebFluxConfiguration} if you still want to allow + * {@link WebFluxConfigurer} instances to customize the configuration. * * @author Brian Clozel * @author Rossen Stoyanchev * @since 5.0 - * @see WebReactiveConfigurer - * @see WebReactiveConfigurationSupport + * @see WebFluxConfigurer + * @see WebFluxConfigurationSupport */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Documented -@Import(DelegatingWebReactiveConfiguration.class) -public @interface EnableWebReactive { +@Import(DelegatingWebFluxConfiguration.class) +public @interface EnableWebFlux { } diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebReactiveConfigurationSupport.java b/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurationSupport.java similarity index 94% rename from spring-webflux/src/main/java/org/springframework/web/reactive/config/WebReactiveConfigurationSupport.java rename to spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurationSupport.java index 202bd8997a..112b5d6dc7 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebReactiveConfigurationSupport.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurationSupport.java @@ -90,16 +90,16 @@ import org.springframework.web.server.handler.ResponseStatusExceptionHandler; * @author Rossen Stoyanchev * @since 5.0 */ -public class WebReactiveConfigurationSupport implements ApplicationContextAware { +public class WebFluxConfigurationSupport implements ApplicationContextAware { private static final boolean jackson2Present = ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper", - WebReactiveConfigurationSupport.class.getClassLoader()) && + WebFluxConfigurationSupport.class.getClassLoader()) && ClassUtils.isPresent("com.fasterxml.jackson.core.JsonGenerator", - WebReactiveConfigurationSupport.class.getClassLoader()); + WebFluxConfigurationSupport.class.getClassLoader()); private static final boolean jaxb2Present = - ClassUtils.isPresent("javax.xml.bind.Binder", WebReactiveConfigurationSupport.class.getClassLoader()); + ClassUtils.isPresent("javax.xml.bind.Binder", WebFluxConfigurationSupport.class.getClassLoader()); private Map corsConfigurations; @@ -138,7 +138,7 @@ public class WebReactiveConfigurationSupport implements ApplicationContextAware public RequestMappingHandlerMapping requestMappingHandlerMapping() { RequestMappingHandlerMapping mapping = createRequestMappingHandlerMapping(); mapping.setOrder(0); - mapping.setContentTypeResolver(webReactiveContentTypeResolver()); + mapping.setContentTypeResolver(webFluxContentTypeResolver()); mapping.setCorsConfigurations(getCorsConfigurations()); PathMatchConfigurer configurer = getPathMatchConfigurer(); @@ -169,7 +169,7 @@ public class WebReactiveConfigurationSupport implements ApplicationContextAware } @Bean - public CompositeContentTypeResolver webReactiveContentTypeResolver() { + public CompositeContentTypeResolver webFluxContentTypeResolver() { RequestedContentTypeResolverBuilder builder = new RequestedContentTypeResolverBuilder(); builder.mediaTypes(getDefaultMediaTypeMappings()); configureContentTypeResolver(builder); @@ -240,7 +240,7 @@ public class WebReactiveConfigurationSupport implements ApplicationContextAware @Bean public HandlerMapping resourceHandlerMapping() { ResourceHandlerRegistry registry = - new ResourceHandlerRegistry(this.applicationContext, webReactiveContentTypeResolver()); + new ResourceHandlerRegistry(this.applicationContext, webFluxContentTypeResolver()); addResourceHandlers(registry); AbstractHandlerMapping handlerMapping = registry.getHandlerMapping(); @@ -271,7 +271,7 @@ public class WebReactiveConfigurationSupport implements ApplicationContextAware RequestMappingHandlerAdapter adapter = createRequestMappingHandlerAdapter(); adapter.setMessageReaders(getMessageReaders()); adapter.setWebBindingInitializer(getConfigurableWebBindingInitializer()); - adapter.setReactiveAdapterRegistry(webReactiveAdapterRegistry()); + adapter.setReactiveAdapterRegistry(webFluxAdapterRegistry()); List resolvers = new ArrayList<>(); addArgumentResolvers(resolvers); @@ -357,14 +357,14 @@ public class WebReactiveConfigurationSupport implements ApplicationContextAware */ protected ConfigurableWebBindingInitializer getConfigurableWebBindingInitializer() { ConfigurableWebBindingInitializer initializer = new ConfigurableWebBindingInitializer(); - initializer.setConversionService(webReactiveConversionService()); - initializer.setValidator(webReactiveValidator()); + initializer.setConversionService(webFluxConversionService()); + initializer.setValidator(webFluxValidator()); initializer.setMessageCodesResolver(getMessageCodesResolver()); return initializer; } @Bean - public FormattingConversionService webReactiveConversionService() { + public FormattingConversionService webFluxConversionService() { FormattingConversionService service = new DefaultFormattingConversionService(); addFormatters(service); return service; @@ -380,7 +380,7 @@ public class WebReactiveConfigurationSupport implements ApplicationContextAware * Return a {@link ReactiveAdapterRegistry} to adapting reactive types. */ @Bean - public ReactiveAdapterRegistry webReactiveAdapterRegistry() { + public ReactiveAdapterRegistry webFluxAdapterRegistry() { return new ReactiveAdapterRegistry(); } @@ -393,7 +393,7 @@ public class WebReactiveConfigurationSupport implements ApplicationContextAware * implementation is not available, a "no-op" {@link Validator} is returned. */ @Bean - public Validator webReactiveValidator() { + public Validator webFluxValidator() { Validator validator = getValidator(); if (validator == null) { if (ClassUtils.isPresent("javax.validation.Validator", getClass().getClassLoader())) { @@ -439,13 +439,13 @@ public class WebReactiveConfigurationSupport implements ApplicationContextAware @Bean public ResponseEntityResultHandler responseEntityResultHandler() { return new ResponseEntityResultHandler( - getMessageWriters(), webReactiveContentTypeResolver(), webReactiveAdapterRegistry()); + getMessageWriters(), webFluxContentTypeResolver(), webFluxAdapterRegistry()); } @Bean public ResponseBodyResultHandler responseBodyResultHandler() { return new ResponseBodyResultHandler( - getMessageWriters(), webReactiveContentTypeResolver(), webReactiveAdapterRegistry()); + getMessageWriters(), webFluxContentTypeResolver(), webFluxAdapterRegistry()); } /** @@ -512,7 +512,7 @@ public class WebReactiveConfigurationSupport implements ApplicationContextAware configureViewResolvers(registry); List resolvers = registry.getViewResolvers(); ViewResolutionResultHandler handler = new ViewResolutionResultHandler( - resolvers, webReactiveContentTypeResolver(), webReactiveAdapterRegistry()); + resolvers, webFluxContentTypeResolver(), webFluxAdapterRegistry()); handler.setDefaultViews(registry.getDefaultViews()); handler.setOrder(registry.getOrder()); return handler; diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebReactiveConfigurer.java b/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurer.java similarity index 94% rename from spring-webflux/src/main/java/org/springframework/web/reactive/config/WebReactiveConfigurer.java rename to spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurer.java index 71a9ced05b..200f450bd8 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebReactiveConfigurer.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurer.java @@ -33,9 +33,9 @@ import org.springframework.web.reactive.result.method.HandlerMethodArgumentResol /** * Defines callback methods to customize the configuration for Web Reactive - * applications enabled via {@code @EnableWebReactive}. + * applications enabled via {@code @EnableWebFlux}. * - *

{@code @EnableWebReactive}-annotated configuration classes may implement + *

{@code @EnableWebFlux}-annotated configuration classes may implement * this interface to be called back and given a chance to customize the * default configuration. Consider implementing this interface and * overriding the relevant methods for your needs. @@ -44,7 +44,7 @@ import org.springframework.web.reactive.result.method.HandlerMethodArgumentResol * @author Rossen Stoyanchev * @since 5.0 */ -public interface WebReactiveConfigurer { +public interface WebFluxConfigurer { /** * Configure how the content type requested for the response is resolved. @@ -92,7 +92,7 @@ public interface WebReactiveConfigurer { * Configure the message readers to use for decoding the request body where * {@code @RequestBody} and {@code HttpEntity} controller method arguments * are used. If none are specified, default ones are added based on - * {@link WebReactiveConfigurationSupport#addDefaultHttpMessageReaders}. + * {@link WebFluxConfigurationSupport#addDefaultHttpMessageReaders}. *

See {@link #extendMessageReaders(List)} for adding readers * in addition to the default ones. * @param readers an empty list to add message readers to @@ -136,7 +136,7 @@ public interface WebReactiveConfigurer { * Configure the message writers to use to encode the response body based on * the return values of {@code @ResponseBody}, and {@code ResponseEntity} * controller methods. If none are specified, default ones are added based on - * {@link WebReactiveConfigurationSupport#addDefaultHttpMessageWriters(List)}. + * {@link WebFluxConfigurationSupport#addDefaultHttpMessageWriters(List)}. *

See {@link #extendMessageWriters(List)} for adding writers * in addition to the default ones. * @param writers a empty list to add message writers to diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebReactiveConfigurerComposite.java b/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurerComposite.java similarity index 85% rename from spring-webflux/src/main/java/org/springframework/web/reactive/config/WebReactiveConfigurerComposite.java rename to spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurerComposite.java index 2a85049e92..618150e42f 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebReactiveConfigurerComposite.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurerComposite.java @@ -32,18 +32,18 @@ import org.springframework.web.reactive.accept.RequestedContentTypeResolverBuild import org.springframework.web.reactive.result.method.HandlerMethodArgumentResolver; /** - * A {@link WebReactiveConfigurer} that delegates to one or more others. + * A {@link WebFluxConfigurer} that delegates to one or more others. * * @author Brian Clozel * @author Rossen Stoyanchev * @since 5.0 */ -public class WebReactiveConfigurerComposite implements WebReactiveConfigurer { +public class WebFluxConfigurerComposite implements WebFluxConfigurer { - private final List delegates = new ArrayList<>(); + private final List delegates = new ArrayList<>(); - public void addWebReactiveConfigurers(List configurers) { + public void addWebFluxConfigurers(List configurers) { if (!CollectionUtils.isEmpty(configurers)) { this.delegates.addAll(configurers); } @@ -92,12 +92,12 @@ public class WebReactiveConfigurerComposite implements WebReactiveConfigurer { @Override public Optional getValidator() { - return createSingleBean(WebReactiveConfigurer::getValidator, Validator.class); + return createSingleBean(WebFluxConfigurer::getValidator, Validator.class); } @Override public Optional getMessageCodesResolver() { - return createSingleBean(WebReactiveConfigurer::getMessageCodesResolver, MessageCodesResolver.class); + return createSingleBean(WebFluxConfigurer::getMessageCodesResolver, MessageCodesResolver.class); } @Override @@ -115,7 +115,7 @@ public class WebReactiveConfigurerComposite implements WebReactiveConfigurer { this.delegates.stream().forEach(delegate -> delegate.configureViewResolvers(registry)); } - private Optional createSingleBean(Function> factory, + private Optional createSingleBean(Function> factory, Class beanType) { List> result = this.delegates.stream() @@ -128,7 +128,7 @@ public class WebReactiveConfigurerComposite implements WebReactiveConfigurer { return result.get(0); } else { - throw new IllegalStateException("More than one WebReactiveConfigurer implements " + + throw new IllegalStateException("More than one WebFluxConfigurer implements " + beanType.getSimpleName() + " factory method."); } } diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/AppCacheManifestTransformer.java b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/AppCacheManifestTransformer.java index 1c782d2dea..ab4414ee86 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/resource/AppCacheManifestTransformer.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/resource/AppCacheManifestTransformer.java @@ -61,7 +61,7 @@ import org.springframework.web.server.ServerWebExchange; *

In order to serve manifest files with the proper {@code "text/manifest"} content type, * it is required to configure it with * {@code requestedContentTypeResolverBuilder.mediaType("appcache", MediaType.valueOf("text/manifest")} - * in {@code WebReactiveConfiguration.configureContentTypeResolver()}. + * in {@code WebFluxConfigurer.configureContentTypeResolver()}. * * @author Rossen Stoyanchev * @author Brian Clozel diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/config/DelegatingWebReactiveConfigurationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/config/DelegatingWebFluxConfigurationTests.java similarity index 61% rename from spring-webflux/src/test/java/org/springframework/web/reactive/config/DelegatingWebReactiveConfigurationTests.java rename to spring-webflux/src/test/java/org/springframework/web/reactive/config/DelegatingWebFluxConfigurationTests.java index d37ffb47d4..f7e9c0db04 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/config/DelegatingWebReactiveConfigurationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/config/DelegatingWebFluxConfigurationTests.java @@ -46,16 +46,16 @@ import static org.mockito.BDDMockito.given; import static org.mockito.BDDMockito.verify; /** - * Test fixture for {@link DelegatingWebReactiveConfiguration} tests. + * Test fixture for {@link DelegatingWebFluxConfiguration} tests. * * @author Brian Clozel */ -public class DelegatingWebReactiveConfigurationTests { +public class DelegatingWebFluxConfigurationTests { - private DelegatingWebReactiveConfiguration delegatingConfig; + private DelegatingWebFluxConfiguration delegatingConfig; @Mock - private WebReactiveConfigurer webReactiveConfigurer; + private WebFluxConfigurer webFluxConfigurer; @Captor private ArgumentCaptor>> readers; @@ -70,38 +70,38 @@ public class DelegatingWebReactiveConfigurationTests { @Before public void setUp() { MockitoAnnotations.initMocks(this); - delegatingConfig = new DelegatingWebReactiveConfiguration(); + delegatingConfig = new DelegatingWebFluxConfiguration(); delegatingConfig.setApplicationContext(new StaticApplicationContext()); - given(webReactiveConfigurer.getValidator()).willReturn(Optional.empty()); - given(webReactiveConfigurer.getMessageCodesResolver()).willReturn(Optional.empty()); + given(webFluxConfigurer.getValidator()).willReturn(Optional.empty()); + given(webFluxConfigurer.getMessageCodesResolver()).willReturn(Optional.empty()); } @Test public void requestMappingHandlerMapping() throws Exception { - delegatingConfig.setConfigurers(Collections.singletonList(webReactiveConfigurer)); + delegatingConfig.setConfigurers(Collections.singletonList(webFluxConfigurer)); delegatingConfig.requestMappingHandlerMapping(); - verify(webReactiveConfigurer).configureContentTypeResolver(any(RequestedContentTypeResolverBuilder.class)); - verify(webReactiveConfigurer).addCorsMappings(any(CorsRegistry.class)); - verify(webReactiveConfigurer).configurePathMatching(any(PathMatchConfigurer.class)); + verify(webFluxConfigurer).configureContentTypeResolver(any(RequestedContentTypeResolverBuilder.class)); + verify(webFluxConfigurer).addCorsMappings(any(CorsRegistry.class)); + verify(webFluxConfigurer).configurePathMatching(any(PathMatchConfigurer.class)); } @Test public void requestMappingHandlerAdapter() throws Exception { - delegatingConfig.setConfigurers(Collections.singletonList(webReactiveConfigurer)); + delegatingConfig.setConfigurers(Collections.singletonList(webFluxConfigurer)); RequestMappingHandlerAdapter adapter = delegatingConfig.requestMappingHandlerAdapter(); ConfigurableWebBindingInitializer initializer = (ConfigurableWebBindingInitializer) adapter.getWebBindingInitializer(); ConversionService initializerConversionService = initializer.getConversionService(); assertTrue(initializer.getValidator() instanceof LocalValidatorFactoryBean); - verify(webReactiveConfigurer).configureMessageReaders(readers.capture()); - verify(webReactiveConfigurer).extendMessageReaders(readers.capture()); - verify(webReactiveConfigurer).getValidator(); - verify(webReactiveConfigurer).getMessageCodesResolver(); - verify(webReactiveConfigurer).addFormatters(formatterRegistry.capture()); - verify(webReactiveConfigurer).addArgumentResolvers(any()); + verify(webFluxConfigurer).configureMessageReaders(readers.capture()); + verify(webFluxConfigurer).extendMessageReaders(readers.capture()); + verify(webFluxConfigurer).getValidator(); + verify(webFluxConfigurer).getMessageCodesResolver(); + verify(webFluxConfigurer).addFormatters(formatterRegistry.capture()); + verify(webFluxConfigurer).addArgumentResolvers(any()); assertSame(formatterRegistry.getValue(), initializerConversionService); assertEquals(7, readers.getValue().size()); @@ -109,34 +109,34 @@ public class DelegatingWebReactiveConfigurationTests { @Test public void resourceHandlerMapping() throws Exception { - delegatingConfig.setConfigurers(Collections.singletonList(webReactiveConfigurer)); + delegatingConfig.setConfigurers(Collections.singletonList(webFluxConfigurer)); doAnswer(invocation -> { ResourceHandlerRegistry registry = invocation.getArgument(0); registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static"); return null; - }).when(webReactiveConfigurer).addResourceHandlers(any(ResourceHandlerRegistry.class)); + }).when(webFluxConfigurer).addResourceHandlers(any(ResourceHandlerRegistry.class)); delegatingConfig.resourceHandlerMapping(); - verify(webReactiveConfigurer).addResourceHandlers(any(ResourceHandlerRegistry.class)); - verify(webReactiveConfigurer).configurePathMatching(any(PathMatchConfigurer.class)); + verify(webFluxConfigurer).addResourceHandlers(any(ResourceHandlerRegistry.class)); + verify(webFluxConfigurer).configurePathMatching(any(PathMatchConfigurer.class)); } @Test public void responseBodyResultHandler() throws Exception { - delegatingConfig.setConfigurers(Collections.singletonList(webReactiveConfigurer)); + delegatingConfig.setConfigurers(Collections.singletonList(webFluxConfigurer)); delegatingConfig.responseBodyResultHandler(); - verify(webReactiveConfigurer).configureMessageWriters(writers.capture()); - verify(webReactiveConfigurer).extendMessageWriters(writers.capture()); - verify(webReactiveConfigurer).configureContentTypeResolver(any(RequestedContentTypeResolverBuilder.class)); + verify(webFluxConfigurer).configureMessageWriters(writers.capture()); + verify(webFluxConfigurer).extendMessageWriters(writers.capture()); + verify(webFluxConfigurer).configureContentTypeResolver(any(RequestedContentTypeResolverBuilder.class)); } @Test public void viewResolutionResultHandler() throws Exception { - delegatingConfig.setConfigurers(Collections.singletonList(webReactiveConfigurer)); + delegatingConfig.setConfigurers(Collections.singletonList(webFluxConfigurer)); delegatingConfig.viewResolutionResultHandler(); - verify(webReactiveConfigurer).configureViewResolvers(any(ViewResolverRegistry.class)); + verify(webFluxConfigurer).configureViewResolvers(any(ViewResolverRegistry.class)); } } diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/config/WebReactiveConfigurationSupportTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/config/WebFluxConfigurationSupportTests.java similarity index 93% rename from spring-webflux/src/test/java/org/springframework/web/reactive/config/WebReactiveConfigurationSupportTests.java rename to spring-webflux/src/test/java/org/springframework/web/reactive/config/WebFluxConfigurationSupportTests.java index eea16756d0..cd03137c0e 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/config/WebReactiveConfigurationSupportTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/config/WebFluxConfigurationSupportTests.java @@ -78,10 +78,10 @@ import static org.springframework.http.MediaType.IMAGE_PNG; import static org.springframework.http.MediaType.TEXT_PLAIN; /** - * Unit tests for {@link WebReactiveConfigurationSupport}. + * Unit tests for {@link WebFluxConfigurationSupport}. * @author Rossen Stoyanchev */ -public class WebReactiveConfigurationSupportTests { +public class WebFluxConfigurationSupportTests { private MockServerHttpRequest request; @@ -94,7 +94,7 @@ public class WebReactiveConfigurationSupportTests { @Test public void requestMappingHandlerMapping() throws Exception { - ApplicationContext context = loadConfig(WebReactiveConfig.class); + ApplicationContext context = loadConfig(WebFluxConfig.class); String name = "requestMappingHandlerMapping"; RequestMappingHandlerMapping mapping = context.getBean(name, RequestMappingHandlerMapping.class); @@ -106,7 +106,7 @@ public class WebReactiveConfigurationSupportTests { assertTrue(mapping.useTrailingSlashMatch()); assertTrue(mapping.useRegisteredSuffixPatternMatch()); - name = "webReactiveContentTypeResolver"; + name = "webFluxContentTypeResolver"; RequestedContentTypeResolver resolver = context.getBean(name, RequestedContentTypeResolver.class); assertSame(resolver, mapping.getContentTypeResolver()); @@ -132,7 +132,7 @@ public class WebReactiveConfigurationSupportTests { @Test public void requestMappingHandlerAdapter() throws Exception { - ApplicationContext context = loadConfig(WebReactiveConfig.class); + ApplicationContext context = loadConfig(WebFluxConfig.class); String name = "requestMappingHandlerAdapter"; RequestMappingHandlerAdapter adapter = context.getBean(name, RequestMappingHandlerAdapter.class); @@ -154,11 +154,11 @@ public class WebReactiveConfigurationSupportTests { WebExchangeDataBinder binder = new WebExchangeDataBinder(new Object()); bindingInitializer.initBinder(binder); - name = "webReactiveConversionService"; + name = "webFluxConversionService"; ConversionService service = context.getBean(name, ConversionService.class); assertSame(service, binder.getConversionService()); - name = "webReactiveValidator"; + name = "webFluxValidator"; Validator validator = context.getBean(name, Validator.class); assertSame(validator, binder.getValidator()); } @@ -180,7 +180,7 @@ public class WebReactiveConfigurationSupportTests { @Test public void responseEntityResultHandler() throws Exception { - ApplicationContext context = loadConfig(WebReactiveConfig.class); + ApplicationContext context = loadConfig(WebFluxConfig.class); String name = "responseEntityResultHandler"; ResponseEntityResultHandler handler = context.getBean(name, ResponseEntityResultHandler.class); @@ -199,14 +199,14 @@ public class WebReactiveConfigurationSupportTests { assertHasMessageWriter(writers, TestBean.class, APPLICATION_JSON); assertHasMessageWriter(writers, TestBean.class, MediaType.parseMediaType("text/event-stream")); - name = "webReactiveContentTypeResolver"; + name = "webFluxContentTypeResolver"; RequestedContentTypeResolver resolver = context.getBean(name, RequestedContentTypeResolver.class); assertSame(resolver, handler.getContentTypeResolver()); } @Test public void responseBodyResultHandler() throws Exception { - ApplicationContext context = loadConfig(WebReactiveConfig.class); + ApplicationContext context = loadConfig(WebFluxConfig.class); String name = "responseBodyResultHandler"; ResponseBodyResultHandler handler = context.getBean(name, ResponseBodyResultHandler.class); @@ -225,7 +225,7 @@ public class WebReactiveConfigurationSupportTests { assertHasMessageWriter(writers, TestBean.class, APPLICATION_JSON); assertHasMessageWriter(writers, TestBean.class, null); - name = "webReactiveContentTypeResolver"; + name = "webFluxContentTypeResolver"; RequestedContentTypeResolver resolver = context.getBean(name, RequestedContentTypeResolver.class); assertSame(resolver, handler.getContentTypeResolver()); } @@ -298,12 +298,12 @@ public class WebReactiveConfigurationSupportTests { return context; } - @EnableWebReactive - static class WebReactiveConfig { + @EnableWebFlux + static class WebFluxConfig { } @Configuration - static class CustomPatchMatchConfig extends WebReactiveConfigurationSupport { + static class CustomPatchMatchConfig extends WebFluxConfigurationSupport { @Override public void configurePathMatching(PathMatchConfigurer configurer) { @@ -313,7 +313,7 @@ public class WebReactiveConfigurationSupportTests { } @Configuration - static class CustomMessageConverterConfig extends WebReactiveConfigurationSupport { + static class CustomMessageConverterConfig extends WebFluxConfigurationSupport { @Override protected void configureMessageReaders(List> messageReaders) { @@ -338,7 +338,7 @@ public class WebReactiveConfigurationSupportTests { @Configuration @SuppressWarnings("unused") - static class CustomViewResolverConfig extends WebReactiveConfigurationSupport { + static class CustomViewResolverConfig extends WebFluxConfigurationSupport { @Override protected void configureViewResolvers(ViewResolverRegistry registry) { @@ -354,7 +354,7 @@ public class WebReactiveConfigurationSupportTests { } @Configuration - static class CustomResourceHandlingConfig extends WebReactiveConfigurationSupport { + static class CustomResourceHandlingConfig extends WebFluxConfigurationSupport { @Override protected void addResourceHandlers(ResourceHandlerRegistry registry) { diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java index ebca9d11b0..4d5b96ba98 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java @@ -41,7 +41,7 @@ import org.springframework.web.client.RestTemplate; import org.springframework.web.reactive.DispatcherHandler; import org.springframework.web.reactive.HandlerAdapter; import org.springframework.web.reactive.HandlerMapping; -import org.springframework.web.reactive.config.WebReactiveConfigurationSupport; +import org.springframework.web.reactive.config.WebFluxConfigurationSupport; import org.springframework.web.reactive.function.server.support.HandlerFunctionAdapter; import org.springframework.web.reactive.function.server.support.ServerResponseResultHandler; import org.springframework.web.reactive.result.view.ViewResolver; @@ -105,7 +105,7 @@ public class DispatcherHandlerIntegrationTests extends AbstractHttpHandlerIntegr @Configuration - static class TestConfiguration extends WebReactiveConfigurationSupport { + static class TestConfiguration extends WebFluxConfigurationSupport { @Bean public PersonHandler personHandler() { diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/BindingContextFactoryTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/BindingContextFactoryTests.java index fdce3b106a..0b29aaa535 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/BindingContextFactoryTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/BindingContextFactoryTests.java @@ -37,7 +37,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.support.WebExchangeDataBinder; import org.springframework.web.method.HandlerMethod; import org.springframework.web.reactive.BindingContext; -import org.springframework.web.reactive.config.WebReactiveConfigurationSupport; +import org.springframework.web.reactive.config.WebFluxConfigurationSupport; import org.springframework.web.reactive.result.ResolvableMethod; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.adapter.DefaultServerWebExchange; @@ -58,7 +58,7 @@ public class BindingContextFactoryTests { @Before public void setUp() throws Exception { - WebReactiveConfigurationSupport configurationSupport = new WebReactiveConfigurationSupport(); + WebFluxConfigurationSupport configurationSupport = new WebFluxConfigurationSupport(); configurationSupport.setApplicationContext(new StaticApplicationContext()); RequestMappingHandlerAdapter adapter = configurationSupport.requestMappingHandlerAdapter(); adapter.afterPropertiesSet(); diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ContextPathIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ContextPathIntegrationTests.java index 40df8f22e3..2af587c1a4 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ContextPathIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ContextPathIntegrationTests.java @@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; import org.springframework.web.reactive.DispatcherHandler; -import org.springframework.web.reactive.config.EnableWebReactive; +import org.springframework.web.reactive.config.EnableWebFlux; import static org.junit.Assert.assertEquals; @@ -92,7 +92,7 @@ public class ContextPathIntegrationTests { } - @EnableWebReactive + @EnableWebFlux @Configuration static class WebApp1Config { @@ -102,7 +102,7 @@ public class ContextPathIntegrationTests { } } - @EnableWebReactive + @EnableWebFlux @Configuration static class WebApp2Config { diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java index 3e86bd6eb4..46d976b574 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java @@ -39,7 +39,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; -import org.springframework.web.reactive.config.EnableWebReactive; +import org.springframework.web.reactive.config.EnableWebFlux; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -222,7 +222,7 @@ public class CrossOriginAnnotationIntegrationTests extends AbstractRequestMappin @Configuration - @EnableWebReactive + @EnableWebFlux @ComponentScan(resourcePattern = "**/CrossOriginAnnotationIntegrationTests*") @SuppressWarnings({"unused", "WeakerAccess"}) static class WebConfig { diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/GlobalCorsConfigIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/GlobalCorsConfigIntegrationTests.java index 0cc0c17678..39939d29e1 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/GlobalCorsConfigIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/GlobalCorsConfigIntegrationTests.java @@ -32,7 +32,7 @@ import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.HttpClientErrorException; import org.springframework.web.client.RestTemplate; import org.springframework.web.reactive.config.CorsRegistry; -import org.springframework.web.reactive.config.WebReactiveConfigurationSupport; +import org.springframework.web.reactive.config.WebFluxConfigurationSupport; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -137,7 +137,7 @@ public class GlobalCorsConfigIntegrationTests extends AbstractRequestMappingInte @Configuration @ComponentScan(resourcePattern = "**/GlobalCorsConfigIntegrationTests*.class") @SuppressWarnings({"unused", "WeakerAccess"}) - static class WebConfig extends WebReactiveConfigurationSupport { + static class WebConfig extends WebFluxConfigurationSupport { @Override protected void addCorsMappings(CorsRegistry registry) { diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonHintsIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonHintsIntegrationTests.java index 3f56fe1b50..1ddb006cc9 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonHintsIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonHintsIntegrationTests.java @@ -34,7 +34,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.reactive.config.EnableWebReactive; +import org.springframework.web.reactive.config.EnableWebFlux; /** * @author Sebastien Deleuze @@ -93,7 +93,7 @@ public class JacksonHintsIntegrationTests extends AbstractRequestMappingIntegrat @Configuration @ComponentScan(resourcePattern = "**/JacksonHintsIntegrationTests*.class") - @EnableWebReactive + @EnableWebFlux @SuppressWarnings({"unused", "WeakerAccess"}) static class WebConfig { } diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingDataBindingIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingDataBindingIntegrationTests.java index 963d750bbc..53525a0dc7 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingDataBindingIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingDataBindingIntegrationTests.java @@ -40,7 +40,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.reactive.config.EnableWebReactive; +import org.springframework.web.reactive.config.EnableWebFlux; import static org.junit.Assert.assertEquals; @@ -83,7 +83,7 @@ public class RequestMappingDataBindingIntegrationTests extends AbstractRequestMa @Configuration - @EnableWebReactive + @EnableWebFlux @ComponentScan(resourcePattern = "**/RequestMappingDataBindingIntegrationTests*.class") @SuppressWarnings({"unused", "WeakerAccess"}) static class WebConfig { diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingExceptionHandlingIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingExceptionHandlingIntegrationTests.java index 2a7f12045e..89cc782a08 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingExceptionHandlingIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingExceptionHandlingIntegrationTests.java @@ -29,7 +29,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.reactive.config.EnableWebReactive; +import org.springframework.web.reactive.config.EnableWebFlux; import static org.junit.Assert.assertEquals; @@ -65,7 +65,7 @@ public class RequestMappingExceptionHandlingIntegrationTests extends AbstractReq @Configuration - @EnableWebReactive + @EnableWebFlux @ComponentScan(resourcePattern = "**/RequestMappingExceptionHandlingIntegrationTests$*.class") @SuppressWarnings({"unused", "WeakerAccess"}) static class WebConfig { diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingIntegrationTests.java index 942a5624ee..0a479d3c9d 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingIntegrationTests.java @@ -29,7 +29,7 @@ import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.reactive.config.EnableWebReactive; +import org.springframework.web.reactive.config.EnableWebFlux; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -80,7 +80,7 @@ public class RequestMappingIntegrationTests extends AbstractRequestMappingIntegr @Configuration - @EnableWebReactive + @EnableWebFlux @ComponentScan(resourcePattern = "**/RequestMappingIntegrationTests$*.class") @SuppressWarnings({"unused", "WeakerAccess"}) static class WebConfig { diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java index 364ab268b9..d963f48dc4 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java @@ -57,7 +57,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.reactive.config.EnableWebReactive; +import org.springframework.web.reactive.config.EnableWebFlux; import static java.util.Arrays.asList; import static org.junit.Assert.assertEquals; @@ -380,7 +380,7 @@ public class RequestMappingMessageConversionIntegrationTests extends AbstractReq @Configuration - @EnableWebReactive + @EnableWebFlux @ComponentScan(resourcePattern = "**/RequestMappingMessageConversionIntegrationTests$*.class") @SuppressWarnings({"unused", "WeakerAccess"}) static class WebConfig { diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingViewResolutionIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingViewResolutionIntegrationTests.java index 91241d4a65..2986c518b5 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingViewResolutionIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingViewResolutionIntegrationTests.java @@ -35,7 +35,7 @@ import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.reactive.config.ViewResolverRegistry; -import org.springframework.web.reactive.config.WebReactiveConfigurationSupport; +import org.springframework.web.reactive.config.WebFluxConfigurationSupport; import org.springframework.web.reactive.result.view.freemarker.FreeMarkerConfigurer; import org.springframework.web.server.ServerWebExchange; @@ -81,7 +81,7 @@ public class RequestMappingViewResolutionIntegrationTests extends AbstractReques @Configuration @ComponentScan(resourcePattern = "**/RequestMappingViewResolutionIntegrationTests$*.class") @SuppressWarnings({"unused", "WeakerAccess"}) - static class WebConfig extends WebReactiveConfigurationSupport { + static class WebConfig extends WebFluxConfigurationSupport { @Override protected void configureViewResolvers(ViewResolverRegistry registry) { diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java index c6ad286137..8c038a2347 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java @@ -33,7 +33,7 @@ import org.springframework.http.server.reactive.HttpHandler; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.DispatcherHandler; -import org.springframework.web.reactive.config.EnableWebReactive; +import org.springframework.web.reactive.config.EnableWebFlux; import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; @@ -181,7 +181,7 @@ public class SseIntegrationTests extends AbstractHttpHandlerIntegrationTests { } @Configuration - @EnableWebReactive + @EnableWebFlux @SuppressWarnings("unused") static class TestConfiguration { diff --git a/src/asciidoc/web-flux.adoc b/src/asciidoc/web-flux.adoc index 2ce9758c59..f76b47a61e 100644 --- a/src/asciidoc/web-flux.adoc +++ b/src/asciidoc/web-flux.adoc @@ -303,7 +303,7 @@ For the **annotation-based programming model** bootstrap with: [source,java,indent=0] [subs="verbatim,quotes"] ---- -ApplicationContext context = new AnnotationConfigApplicationContext(DelegatingWebReactiveConfiguration.class); // (1) +ApplicationContext context = new AnnotationConfigApplicationContext(DelegatingWebFluxConfiguration.class); // (1) HttpHandler handler = DispatcherHandler.toHttpHandler(context); // (2) ----