From 014240d5762a5cab8a21ba0f5e849c8b2934b529 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 3 Apr 2025 09:04:26 +0100 Subject: [PATCH] Create spring-boot-webflux module --- settings.gradle | 1 + .../build.gradle | 1 + ...activeHealthEndpointWebExtensionTests.java | 2 +- ...oundryWebFluxEndpointIntegrationTests.java | 4 +- ...FoundryActuatorAutoConfigurationTests.java | 2 +- .../AbstractEndpointDocumentationTests.java | 4 +- ...rollerEndpointWebFluxIntegrationTests.java | 2 +- ...WebFluxEndpointAccessIntegrationTests.java | 4 +- .../WebFluxEndpointCorsIntegrationTests.java | 4 +- .../WebFluxEndpointIntegrationTests.java | 4 +- ...ndpointAdditionalPathIntegrationTests.java | 4 +- ...FluxObservationAutoConfigurationTests.java | 4 +- .../EndpointRequestIntegrationTests.java | 4 +- ...mentWebSecurityAutoConfigurationTests.java | 2 +- ...dContextConfigurationIntegrationTests.java | 4 +- .../spring-boot-actuator/build.gradle | 1 + ...ndpointHandlerMappingIntegrationTests.java | 2 +- .../WebFluxEndpointIntegrationTests.java | 2 +- ...EndpointTestInvocationContextProvider.java | 2 +- .../build.gradle | 1 + ...iveSessionAutoConfigurationMongoTests.java | 2 +- ...iveSessionAutoConfigurationRedisTests.java | 2 +- .../session/SessionAutoConfiguration.java | 14 ++-- ...itional-spring-configuration-metadata.json | 76 ----------------- ...ot.autoconfigure.AutoConfiguration.imports | 5 -- .../GraphQlWebFluxAutoConfigurationTests.java | 4 +- .../GraphQlRSocketAutoConfigurationTests.java | 6 +- ...WebFluxSecurityAutoConfigurationTests.java | 4 +- .../spring-boot-dependencies/build.gradle | 1 + .../spring-boot-docs/build.gradle | 3 + .../MyReactiveCloudFoundryConfiguration.java | 4 +- .../MyErrorWebExceptionHandler.java | 6 +- .../MyReactiveCloudFoundryConfiguration.kt | 2 +- .../MyErrorWebExceptionHandler.kt | 4 +- .../FreeMarkerReactiveWebConfiguration.java | 2 +- .../spring-boot-starter-webflux/build.gradle | 4 +- .../build.gradle | 1 + .../WebTestClientAutoConfiguration.java | 5 +- ....web.reactive.AutoConfigureWebFlux.imports | 4 +- .../webclient/ExampleWebExceptionHandler.java | 4 +- ...TestAutoConfigurationIntegrationTests.java | 2 +- .../spring-boot-thymeleaf/build.gradle | 6 +- .../ThymeleafAutoConfiguration.java | 2 +- .../spring-boot-webflux/build.gradle | 30 +++++++ .../HttpHandlerAutoConfiguration.java | 6 +- .../ProblemDetailsExceptionHandler.java | 4 +- .../ReactiveMultipartAutoConfiguration.java | 4 +- .../ReactiveMultipartProperties.java | 4 +- ...ResourceHandlerRegistrationCustomizer.java | 4 +- ...ResourceHandlerRegistrationCustomizer.java | 6 +- .../WebFluxAutoConfiguration.java | 20 +++-- .../autoconfigure}/WebFluxProperties.java | 4 +- .../autoconfigure}/WebFluxRegistrations.java | 8 +- .../WebHttpHandlerBuilderCustomizer.java | 6 +- ...WebSessionIdResolverAutoConfiguration.java | 4 +- .../WelcomePageRouterFunctionFactory.java | 4 +- .../AbstractErrorWebExceptionHandler.java | 11 +-- .../DefaultErrorWebExceptionHandler.java | 12 ++- .../error/ErrorWebFluxAutoConfiguration.java | 12 +-- .../autoconfigure}/error/package-info.java | 4 +- .../webflux/autoconfigure}/package-info.java | 4 +- .../error/DefaultErrorAttributes.java | 4 +- .../boot/webflux}/error/ErrorAttributes.java | 6 +- .../error/ErrorWebExceptionHandler.java | 6 +- .../boot/webflux}/error/package-info.java | 4 +- .../filter/OrderedHiddenHttpMethodFilter.java | 6 +- .../webflux}/filter/OrderedWebFilter.java | 6 +- .../boot/webflux}/filter/package-info.java | 4 +- ...itional-spring-configuration-metadata.json | 83 +++++++++++++++++++ ...ot.autoconfigure.AutoConfiguration.imports | 5 ++ .../HttpHandlerAutoConfigurationTests.java | 4 +- ...activeMultipartAutoConfigurationTests.java | 4 +- .../ReactiveMultipartPropertiesTests.java | 4 +- .../WebFluxAutoConfigurationTests.java | 20 +++-- .../WebFluxPropertiesTests.java | 4 +- ...WelcomePageRouterFunctionFactoryTests.java | 2 +- ...orWebExceptionHandlerIntegrationTests.java | 12 +-- .../DefaultErrorWebExceptionHandlerTests.java | 4 +- .../autoconfigure}/error/DummyBody.java | 4 +- .../error/DefaultErrorAttributesTests.java | 5 +- .../error/templates/error/404.mustache | 0 .../error/templates/error/4xx.mustache | 0 .../spring-boot-sni-tests/build.gradle | 1 + .../spring-boot-sni-reactive-app/build.gradle | 4 +- .../profile/AttributeInjectionTests.java | 2 +- 85 files changed, 299 insertions(+), 259 deletions(-) create mode 100644 spring-boot-project/spring-boot-webflux/build.gradle rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/HttpHandlerAutoConfiguration.java (96%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/ProblemDetailsExceptionHandler.java (89%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/ReactiveMultipartAutoConfiguration.java (97%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/ReactiveMultipartProperties.java (97%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/ResourceChainResourceHandlerRegistrationCustomizer.java (95%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/ResourceHandlerRegistrationCustomizer.java (88%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/WebFluxAutoConfiguration.java (95%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/WebFluxProperties.java (97%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/WebFluxRegistrations.java (88%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/WebHttpHandlerBuilderCustomizer.java (88%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/WebSessionIdResolverAutoConfiguration.java (97%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/WelcomePageRouterFunctionFactory.java (96%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/error/AbstractErrorWebExceptionHandler.java (97%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/error/DefaultErrorWebExceptionHandler.java (97%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/error/ErrorWebFluxAutoConfiguration.java (89%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/error/package-info.java (83%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure}/package-info.java (84%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux}/error/DefaultErrorAttributes.java (99%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux}/error/ErrorAttributes.java (94%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux}/error/ErrorWebExceptionHandler.java (87%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux}/error/package-info.java (85%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux}/filter/OrderedHiddenHttpMethodFilter.java (91%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux}/filter/OrderedWebFilter.java (88%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/reactive => spring-boot-webflux/src/main/java/org/springframework/boot/webflux}/filter/package-info.java (85%) create mode 100644 spring-boot-project/spring-boot-webflux/src/main/resources/META-INF/additional-spring-configuration-metadata.json create mode 100644 spring-boot-project/spring-boot-webflux/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure}/HttpHandlerAutoConfigurationTests.java (97%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure}/ReactiveMultipartAutoConfigurationTests.java (97%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure}/ReactiveMultipartPropertiesTests.java (93%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure}/WebFluxAutoConfigurationTests.java (98%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure}/WebFluxPropertiesTests.java (94%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure}/WelcomePageRouterFunctionFactoryTests.java (99%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure}/error/DefaultErrorWebExceptionHandlerIntegrationTests.java (98%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure}/error/DefaultErrorWebExceptionHandlerTests.java (97%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure}/error/DummyBody.java (86%) rename spring-boot-project/{spring-boot-all/src/test/java/org/springframework/boot/web/reactive => spring-boot-webflux/src/test/java/org/springframework/boot/webflux}/error/DefaultErrorAttributesTests.java (99%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/test/resources/org/springframework/boot/webflux/autoconfigure}/error/templates/error/404.mustache (100%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/web/reactive => spring-boot-webflux/src/test/resources/org/springframework/boot/webflux/autoconfigure}/error/templates/error/4xx.mustache (100%) diff --git a/settings.gradle b/settings.gradle index fc726befac..675c524991 100644 --- a/settings.gradle +++ b/settings.gradle @@ -133,6 +133,7 @@ include "spring-boot-project:spring-boot-tools:spring-boot-test-support-docker" include "spring-boot-project:spring-boot-tx" include "spring-boot-project:spring-boot-undertow" include "spring-boot-project:spring-boot-validation" +include "spring-boot-project:spring-boot-webflux" include "spring-boot-project:spring-boot-webmvc" include "spring-boot-project:spring-boot-webservices" include "spring-boot-system-tests:spring-boot-deployment-tests" diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle index a84d1a46c7..427b85b04e 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle @@ -63,6 +63,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-tomcat")) optional(project(":spring-boot-project:spring-boot-undertow")) optional(project(":spring-boot-project:spring-boot-validation")) + optional(project(":spring-boot-project:spring-boot-webflux")) optional(project(":spring-boot-project:spring-boot-webmvc")) optional("ch.qos.logback:logback-classic") optional("org.apache.cassandra:java-driver-core") { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/CloudFoundryReactiveHealthEndpointWebExtensionTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/CloudFoundryReactiveHealthEndpointWebExtensionTests.java index 3f1254bb66..0dedd404f4 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/CloudFoundryReactiveHealthEndpointWebExtensionTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/CloudFoundryReactiveHealthEndpointWebExtensionTests.java @@ -32,12 +32,12 @@ import org.springframework.boot.actuate.health.HealthComponent; import org.springframework.boot.actuate.health.HealthIndicator; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration; import org.springframework.boot.http.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.security.autoconfigure.reactive.ReactiveSecurityAutoConfiguration; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.core.userdetails.MapReactiveUserDetailsService; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/CloudFoundryWebFluxEndpointIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/CloudFoundryWebFluxEndpointIntegrationTests.java index eac2600ec3..bf6dba9f3d 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/CloudFoundryWebFluxEndpointIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/CloudFoundryWebFluxEndpointIntegrationTests.java @@ -44,13 +44,13 @@ import org.springframework.boot.actuate.endpoint.web.EndpointMediaTypes; import org.springframework.boot.actuate.endpoint.web.ExposableWebEndpoint; import org.springframework.boot.actuate.endpoint.web.annotation.WebEndpointDiscoverer; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.reactor.netty.autoconfigure.NettyReactiveWebServerAutoConfiguration; import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplicationContext; import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext; +import org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java index de7577028f..938d9ee699 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java @@ -50,7 +50,6 @@ import org.springframework.boot.actuate.endpoint.web.WebOperationRequestPredicat import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration; import org.springframework.boot.http.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; @@ -62,6 +61,7 @@ import org.springframework.boot.test.context.runner.ReactiveWebApplicationContex import org.springframework.boot.testsupport.classpath.resources.WithPackageResources; import org.springframework.boot.testsupport.classpath.resources.WithResource; import org.springframework.boot.web.reactive.function.client.WebClientCustomizer; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AbstractEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AbstractEndpointDocumentationTests.java index 44b4698e1e..0d33d9d000 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AbstractEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AbstractEndpointDocumentationTests.java @@ -37,10 +37,10 @@ import org.springframework.boot.actuate.autoconfigure.endpoint.web.servlet.WebMv import org.springframework.boot.actuate.endpoint.jackson.EndpointObjectMapper; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.http.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration; import org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration; import org.springframework.context.annotation.Bean; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebFluxIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebFluxIntegrationTests.java index 39ac9727d6..f7de1aac64 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebFluxIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebFluxIntegrationTests.java @@ -28,11 +28,11 @@ import org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpoi import org.springframework.boot.actuate.endpoint.web.annotation.RestControllerEndpoint; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.http.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.test.util.TestPropertyValues; import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebApplicationContext; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.security.authentication.TestingAuthenticationToken; import org.springframework.security.test.context.TestSecurityContextHolder; import org.springframework.test.web.reactive.server.WebTestClient; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointAccessIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointAccessIntegrationTests.java index ce31ab1605..6ffe211b55 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointAccessIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointAccessIntegrationTests.java @@ -24,8 +24,6 @@ import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfi import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.reactor.netty.autoconfigure.NettyReactiveWebServerAutoConfiguration; @@ -33,6 +31,8 @@ import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplic import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext; import org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext; +import org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.test.web.reactive.server.EntityExchangeResult; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointCorsIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointCorsIntegrationTests.java index 7d1fbd7a74..6a466b5215 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointCorsIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointCorsIntegrationTests.java @@ -26,13 +26,13 @@ import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAu import org.springframework.boot.actuate.autoconfigure.endpoint.web.reactive.WebFluxEndpointManagementContextConfiguration; import org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.web.reactive.context.ReactiveWebApplicationContext; +import org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.http.HttpHeaders; import org.springframework.test.web.reactive.server.WebTestClient; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointIntegrationTests.java index 41cb110482..7cf75202b9 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointIntegrationTests.java @@ -25,11 +25,11 @@ import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfi import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; +import org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxHealthEndpointAdditionalPathIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxHealthEndpointAdditionalPathIntegrationTests.java index 9b31804e56..1f681eedd8 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxHealthEndpointAdditionalPathIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxHealthEndpointAdditionalPathIntegrationTests.java @@ -24,8 +24,6 @@ import org.springframework.boot.actuate.autoconfigure.system.DiskSpaceHealthCont import org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.web.server.netty.NettyReactiveManagementContextAutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.reactor.netty.autoconfigure.NettyReactiveWebServerAutoConfiguration; @@ -34,6 +32,8 @@ import org.springframework.boot.test.context.runner.ReactiveWebApplicationContex import org.springframework.boot.web.context.ServerPortInfoApplicationContextInitializer; import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext; import org.springframework.boot.web.reactive.context.ConfigurableReactiveWebApplicationContext; +import org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; /** * Integration tests for Webflux health groups on an additional path. diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/observation/web/reactive/WebFluxObservationAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/observation/web/reactive/WebFluxObservationAutoConfigurationTests.java index 384be8d4ae..d8da604c27 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/observation/web/reactive/WebFluxObservationAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/observation/web/reactive/WebFluxObservationAutoConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -28,11 +28,11 @@ import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun; import org.springframework.boot.actuate.autoconfigure.metrics.web.TestController; import org.springframework.boot.actuate.autoconfigure.observation.ObservationAutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplicationContext; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.test.system.CapturedOutput; import org.springframework.boot.test.system.OutputCaptureExtension; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.http.server.reactive.observation.DefaultServerRequestObservationConvention; import org.springframework.http.server.reactive.observation.ServerRequestObservationConvention; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/reactive/EndpointRequestIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/reactive/EndpointRequestIntegrationTests.java index 3a0146d98e..592bed0eff 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/reactive/EndpointRequestIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/reactive/EndpointRequestIntegrationTests.java @@ -29,8 +29,6 @@ import org.springframework.boot.actuate.endpoint.annotation.Endpoint; import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; import org.springframework.boot.actuate.endpoint.annotation.WriteOperation; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.http.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; @@ -40,6 +38,8 @@ import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplic import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.tomcat.reactive.TomcatReactiveWebServerFactory; import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext; +import org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpMethod; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/reactive/ReactiveManagementWebSecurityAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/reactive/ReactiveManagementWebSecurityAutoConfigurationTests.java index f52614abe4..bd4a35c063 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/reactive/ReactiveManagementWebSecurityAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/reactive/ReactiveManagementWebSecurityAutoConfigurationTests.java @@ -31,11 +31,11 @@ import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAu import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.info.InfoEndpointAutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.security.autoconfigure.reactive.ReactiveSecurityAutoConfiguration; import org.springframework.boot.security.oauth2.server.resource.autoconfigure.reactive.ReactiveOAuth2ResourceServerAutoConfiguration; import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplicationContext; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.context.annotation.Bean; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementChildContextConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementChildContextConfigurationIntegrationTests.java index c06e4bea5d..f2522418eb 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementChildContextConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementChildContextConfigurationIntegrationTests.java @@ -36,8 +36,6 @@ import org.springframework.boot.actuate.autoconfigure.web.server.tomcat.TomcatRe import org.springframework.boot.actuate.endpoint.annotation.Endpoint; import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.convert.ApplicationConversionService; import org.springframework.boot.env.ConfigTreePropertySource; import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplicationContext; @@ -49,6 +47,8 @@ import org.springframework.boot.web.context.ServerPortInfoApplicationContextInit import org.springframework.boot.web.context.WebServerInitializedEvent; import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext; import org.springframework.boot.web.server.WebServer; +import org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.context.ApplicationListener; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.core.convert.support.ConfigurableConversionService; diff --git a/spring-boot-project/spring-boot-actuator/build.gradle b/spring-boot-project/spring-boot-actuator/build.gradle index 3bdeadb9c3..d7a1426aeb 100644 --- a/spring-boot-project/spring-boot-actuator/build.gradle +++ b/spring-boot-project/spring-boot-actuator/build.gradle @@ -39,6 +39,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-tomcat")) optional(project(":spring-boot-project:spring-boot-undertow")) optional(project(":spring-boot-project:spring-boot-validation")) + optional(project(":spring-boot-project:spring-boot-webflux")) optional(project(":spring-boot-project:spring-boot-webmvc")) optional("com.fasterxml.jackson.core:jackson-databind") optional("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/ControllerEndpointHandlerMappingIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/ControllerEndpointHandlerMappingIntegrationTests.java index 53059b3583..4fd13e206a 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/ControllerEndpointHandlerMappingIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/ControllerEndpointHandlerMappingIntegrationTests.java @@ -31,7 +31,6 @@ import org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpoi import org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpointsSupplier; import org.springframework.boot.actuate.endpoint.web.annotation.RestControllerEndpoint; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.http.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory; @@ -39,6 +38,7 @@ import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplic import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointIntegrationTests.java index cad051f346..fcefaf8df9 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointIntegrationTests.java @@ -26,10 +26,10 @@ import org.springframework.boot.actuate.endpoint.web.EndpointMediaTypes; import org.springframework.boot.actuate.endpoint.web.annotation.AbstractWebEndpointIntegrationTests; import org.springframework.boot.actuate.endpoint.web.annotation.WebEndpointDiscoverer; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration; import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory; import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext; import org.springframework.boot.web.reactive.context.ReactiveWebServerInitializedEvent; +import org.springframework.boot.webflux.autoconfigure.error.ErrorWebFluxAutoConfiguration; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationListener; import org.springframework.context.annotation.Bean; diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTestInvocationContextProvider.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTestInvocationContextProvider.java index bce1bc761b..a6acfc1015 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTestInvocationContextProvider.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTestInvocationContextProvider.java @@ -48,7 +48,6 @@ import org.springframework.boot.actuate.endpoint.web.reactive.WebFluxEndpointHan import org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping; import org.springframework.boot.actuate.endpoint.web.test.WebEndpointTest.Infrastructure; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.http.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.jersey.autoconfigure.JerseyAutoConfiguration; @@ -58,6 +57,7 @@ import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory; import org.springframework.boot.web.context.WebServerInitializedEvent; import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext; import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration; import org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration; import org.springframework.context.ApplicationContext; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle index 59d5a92c04..7424c6c2c3 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle +++ b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle @@ -61,6 +61,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-tomcat")) optional(project(":spring-boot-project:spring-boot-tx")) optional(project(":spring-boot-project:spring-boot-validation")) + optional(project(":spring-boot-project:spring-boot-webflux")) optional(project(":spring-boot-project:spring-boot-webmvc")) optional("com.fasterxml.jackson.core:jackson-databind") optional("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor") diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/session/ReactiveSessionAutoConfigurationMongoTests.java b/spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/session/ReactiveSessionAutoConfigurationMongoTests.java index 93247fea54..9adf680a04 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/session/ReactiveSessionAutoConfigurationMongoTests.java +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/session/ReactiveSessionAutoConfigurationMongoTests.java @@ -25,7 +25,6 @@ import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.web.reactive.WebSessionIdResolverAutoConfiguration; import org.springframework.boot.data.mongodb.autoconfigure.MongoDataAutoConfiguration; import org.springframework.boot.data.mongodb.autoconfigure.MongoReactiveDataAutoConfiguration; import org.springframework.boot.mongodb.autoconfigure.MongoAutoConfiguration; @@ -35,6 +34,7 @@ import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplic import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.testsupport.container.TestImage; +import org.springframework.boot.webflux.autoconfigure.WebSessionIdResolverAutoConfiguration; import org.springframework.http.ResponseCookie; import org.springframework.session.MapSession; import org.springframework.session.data.mongo.ReactiveMongoSessionRepository; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/session/ReactiveSessionAutoConfigurationRedisTests.java b/spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/session/ReactiveSessionAutoConfigurationRedisTests.java index b21b832c97..c7cab74efb 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/session/ReactiveSessionAutoConfigurationRedisTests.java +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/session/ReactiveSessionAutoConfigurationRedisTests.java @@ -28,7 +28,6 @@ import reactor.core.publisher.Mono; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.web.ServerProperties; -import org.springframework.boot.autoconfigure.web.reactive.WebSessionIdResolverAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; @@ -36,6 +35,7 @@ import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplic import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.testsupport.container.TestImage; +import org.springframework.boot.webflux.autoconfigure.WebSessionIdResolverAutoConfiguration; import org.springframework.data.redis.connection.ReactiveRedisConnection; import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory; import org.springframework.data.redis.connection.RedisConnectionFactory; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java index ac3a49fd77..62d9b6ee9c 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java @@ -28,10 +28,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; import org.springframework.boot.autoconfigure.web.ServerProperties; -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxProperties; -import org.springframework.boot.autoconfigure.web.reactive.WebSessionIdResolverAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.PropertyMapper; import org.springframework.boot.web.server.Cookie; @@ -61,18 +57,20 @@ import org.springframework.session.web.http.HttpSessionIdResolver; * @author Weix Sun * @since 1.4.0 */ -@AutoConfiguration(after = WebSessionIdResolverAutoConfiguration.class, +@AutoConfiguration( + beforeName = { "org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration", + "org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration" }, afterName = { "org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration", "org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration", "org.springframework.boot.jdbc.autoconfigure.JdbcTemplateAutoConfiguration", "org.springframework.boot.data.mongodb.autoconfigure.MongoDataAutoConfiguration", "org.springframework.boot.data.mongodb.autoconfigure.MongoReactiveDataAutoConfiguration", "org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration", - "org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration" }, - before = { HttpHandlerAutoConfiguration.class, WebFluxAutoConfiguration.class }) + "org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration", + "org.springframework.boot.autoconfigure.session.WebSessionIdResolverAutoConfiguration" }) @ConditionalOnClass(Session.class) @ConditionalOnWebApplication -@EnableConfigurationProperties({ ServerProperties.class, SessionProperties.class, WebFluxProperties.class }) +@EnableConfigurationProperties({ ServerProperties.class, SessionProperties.class }) public class SessionAutoConfiguration { @Configuration(proxyBeanMethods = false) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json index c9895e9498..c58e3fc7a5 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -481,20 +481,6 @@ "replacement": "spring.sql.init.mode", "level": "warning" } - }, - { - "name": "spring.webflux.hiddenmethod.filter.enabled", - "type": "java.lang.Boolean", - "description": "Whether to enable Spring's HiddenHttpMethodFilter.", - "defaultValue": false - }, - { - "name": "spring.webflux.multipart.streaming", - "type": "java.lang.Boolean", - "deprecation": { - "reason": "Replaced by the PartEventHttpMessageReader and the PartEvent API.", - "level": "error" - } } ], "hints": [ @@ -628,68 +614,6 @@ } } ] - }, - { - "name": "spring.webflux.format.date", - "values": [ - { - "value": "dd/MM/yyyy", - "description": "Example date format. Any format supported by DateTimeFormatter.parse can be used." - }, - { - "value": "iso", - "description": "ISO-8601 extended local date format." - } - ], - "providers": [ - { - "name": "any" - } - ] - }, - { - "name": "spring.webflux.format.date-time", - "values": [ - { - "value": "yyyy-MM-dd HH:mm:ss", - "description": "Example date-time format. Any format supported by DateTimeFormatter.parse can be used." - }, - { - "value": "iso", - "description": "ISO-8601 extended local date-time format." - }, - { - "value": "iso-offset", - "description": "ISO offset date-time format." - } - ], - "providers": [ - { - "name": "any" - } - ] - }, - { - "name": "spring.webflux.format.time", - "values": [ - { - "value": "HH:mm:ss", - "description": "Example time format. Any format supported by DateTimeFormatter.parse can be used." - }, - { - "value": "iso", - "description": "ISO-8601 extended local time format." - }, - { - "value": "iso-offset", - "description": "ISO offset time format." - } - ], - "providers": [ - { - "name": "any" - } - ] } ] } diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 8a29d9f2bd..b1b645aee1 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -20,11 +20,6 @@ org.springframework.boot.autoconfigure.reactor.ReactorAutoConfiguration org.springframework.boot.autoconfigure.session.SessionAutoConfiguration org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration -org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration -org.springframework.boot.autoconfigure.web.reactive.ReactiveMultipartAutoConfiguration -org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration -org.springframework.boot.autoconfigure.web.reactive.WebSessionIdResolverAutoConfiguration -org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration org.springframework.boot.autoconfigure.web.reactive.function.client.ClientHttpConnectorAutoConfiguration org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfigurationTests.java index d6479d27be..34c0cc14b6 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfigurationTests.java @@ -30,12 +30,12 @@ import org.springframework.aot.hint.predicate.RuntimeHintsPredicates; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration; import org.springframework.boot.autoconfigure.graphql.GraphQlTestDataFetchers; -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.testsupport.classpath.resources.WithResource; +import org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/graphql/rsocket/GraphQlRSocketAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/graphql/rsocket/GraphQlRSocketAutoConfigurationTests.java index 96a888d957..acfd053af8 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/graphql/rsocket/GraphQlRSocketAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/graphql/rsocket/GraphQlRSocketAutoConfigurationTests.java @@ -27,9 +27,6 @@ import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration; import org.springframework.boot.autoconfigure.graphql.GraphQlTestDataFetchers; -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory; import org.springframework.boot.reactor.netty.NettyRouteProvider; @@ -41,6 +38,9 @@ import org.springframework.boot.test.context.runner.ReactiveWebApplicationContex import org.springframework.boot.testsupport.classpath.resources.WithResource; import org.springframework.boot.web.context.ServerPortInfoApplicationContextInitializer; import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext; +import org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.error.ErrorWebFluxAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.graphql.client.RSocketGraphQlClient; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/graphql/security/GraphQlWebFluxSecurityAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/graphql/security/GraphQlWebFluxSecurityAutoConfigurationTests.java index b7130f2778..80f8632ec3 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/graphql/security/GraphQlWebFluxSecurityAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/graphql/security/GraphQlWebFluxSecurityAutoConfigurationTests.java @@ -29,13 +29,13 @@ import org.springframework.boot.autoconfigure.graphql.Book; import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration; import org.springframework.boot.autoconfigure.graphql.GraphQlTestDataFetchers; import org.springframework.boot.autoconfigure.graphql.reactive.GraphQlWebFluxAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.security.autoconfigure.reactive.ReactiveSecurityAutoConfiguration; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.testsupport.classpath.resources.WithResource; +import org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.graphql.execution.ErrorType; diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 86b0bcb057..3511e842a5 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -2106,6 +2106,7 @@ bom { "spring-boot-tx", "spring-boot-undertow", "spring-boot-validation", + "spring-boot-webflux", "spring-boot-webmvc", "spring-boot-webservices" ] diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index 23d42e62f3..5a5b7ab8f0 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -124,6 +124,7 @@ dependencies { autoConfiguration(project(path: ":spring-boot-project:spring-boot-tx", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-undertow", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-validation", configuration: "autoConfigurationMetadata")) + autoConfiguration(project(path: ":spring-boot-project:spring-boot-webflux", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-webmvc", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-webservices", configuration: "autoConfigurationMetadata")) @@ -193,6 +194,7 @@ dependencies { configurationProperties(project(path: ":spring-boot-project:spring-boot-tomcat", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-tx", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-undertow", configuration: "configurationPropertiesMetadata")) + configurationProperties(project(path: ":spring-boot-project:spring-boot-webflux", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-webmvc", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-webservices", configuration: "configurationPropertiesMetadata")) @@ -228,6 +230,7 @@ dependencies { implementation(project(path: ":spring-boot-project:spring-boot-tools:spring-boot-cli")) implementation(project(path: ":spring-boot-project:spring-boot-tools:spring-boot-loader-tools")) implementation(project(path: ":spring-boot-project:spring-boot-undertow")) + implementation(project(path: ":spring-boot-project:spring-boot-webflux")) implementation(project(path: ":spring-boot-project:spring-boot-webmvc")) implementation(project(path: ":spring-boot-project:spring-boot-webservices")) implementation("ch.qos.logback:logback-classic") diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/actuator/cloudfoundry/customcontextpath/MyReactiveCloudFoundryConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/actuator/cloudfoundry/customcontextpath/MyReactiveCloudFoundryConfiguration.java index c4712866c7..97a282502b 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/actuator/cloudfoundry/customcontextpath/MyReactiveCloudFoundryConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/actuator/cloudfoundry/customcontextpath/MyReactiveCloudFoundryConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 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. @@ -20,8 +20,8 @@ import java.util.Map; import reactor.core.publisher.Mono; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.boot.webflux.autoconfigure.WebFluxProperties; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/reactive/webflux/errorhandling/MyErrorWebExceptionHandler.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/reactive/webflux/errorhandling/MyErrorWebExceptionHandler.java index b2cb34518b..4ee95a064b 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/reactive/webflux/errorhandling/MyErrorWebExceptionHandler.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/reactive/webflux/errorhandling/MyErrorWebExceptionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 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. @@ -19,8 +19,8 @@ package org.springframework.boot.docs.web.reactive.webflux.errorhandling; import reactor.core.publisher.Mono; import org.springframework.boot.autoconfigure.web.WebProperties; -import org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler; -import org.springframework.boot.web.reactive.error.ErrorAttributes; +import org.springframework.boot.webflux.autoconfigure.error.AbstractErrorWebExceptionHandler; +import org.springframework.boot.webflux.error.ErrorAttributes; import org.springframework.context.ApplicationContext; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/actuator/cloudfoundry/customcontextpath/MyReactiveCloudFoundryConfiguration.kt b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/actuator/cloudfoundry/customcontextpath/MyReactiveCloudFoundryConfiguration.kt index 8d2bde57e5..9994b5dae2 100644 --- a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/actuator/cloudfoundry/customcontextpath/MyReactiveCloudFoundryConfiguration.kt +++ b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/actuator/cloudfoundry/customcontextpath/MyReactiveCloudFoundryConfiguration.kt @@ -15,8 +15,8 @@ */ package org.springframework.boot.docs.actuator.cloudfoundry.customcontextpath -import org.springframework.boot.autoconfigure.web.reactive.WebFluxProperties import org.springframework.boot.context.properties.EnableConfigurationProperties +import org.springframework.boot.webflux.autoconfigure.WebFluxProperties import org.springframework.context.ApplicationContext import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration diff --git a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/web/reactive/webflux/errorhandling/MyErrorWebExceptionHandler.kt b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/web/reactive/webflux/errorhandling/MyErrorWebExceptionHandler.kt index 3ed09fd1e0..08cbd9c8b8 100644 --- a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/web/reactive/webflux/errorhandling/MyErrorWebExceptionHandler.kt +++ b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/web/reactive/webflux/errorhandling/MyErrorWebExceptionHandler.kt @@ -17,8 +17,8 @@ package org.springframework.boot.docs.web.reactive.webflux.errorhandling import org.springframework.boot.autoconfigure.web.WebProperties -import org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler -import org.springframework.boot.web.reactive.error.ErrorAttributes +import org.springframework.boot.webflux.error.ErrorAttributes +import org.springframework.boot.webflux.autoconfigure.error.AbstractErrorWebExceptionHandler import org.springframework.context.ApplicationContext import org.springframework.http.HttpStatus import org.springframework.http.MediaType diff --git a/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerReactiveWebConfiguration.java b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerReactiveWebConfiguration.java index 3ee8322ce2..74fffc40d8 100644 --- a/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerReactiveWebConfiguration.java +++ b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerReactiveWebConfiguration.java @@ -37,7 +37,7 @@ import org.springframework.web.reactive.result.view.freemarker.FreeMarkerViewRes @Configuration(proxyBeanMethods = false) @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE) @ConditionalOnClass(FreeMarkerConfigurer.class) -@AutoConfigureAfter(name = "org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration") +@AutoConfigureAfter(name = "org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration") class FreeMarkerReactiveWebConfiguration extends AbstractFreeMarkerConfiguration { FreeMarkerReactiveWebConfiguration(FreeMarkerProperties properties, diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-webflux/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-webflux/build.gradle index f2ba81f775..08aa14c62d 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-webflux/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-webflux/build.gradle @@ -5,10 +5,8 @@ plugins { description = "Starter for building WebFlux applications using Spring Framework's Reactive Web support" dependencies { - api(project(":spring-boot-project:spring-boot-http-codec")) api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter")) api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-json")) api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-reactor-netty")) - api("org.springframework:spring-web") - api("org.springframework:spring-webflux") + api(project(":spring-boot-project:spring-boot-webflux")) } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle index 7f4c56bff1..897eddb186 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle @@ -77,6 +77,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-security-saml2")) optional(project(":spring-boot-project:spring-boot-tx")) optional(project(":spring-boot-project:spring-boot-validation")) + optional(project(":spring-boot-project:spring-boot-webflux")) optional(project(":spring-boot-project:spring-boot-webmvc")) optional(project(":spring-boot-project:spring-boot-webservices")) optional("jakarta.json.bind:jakarta.json.bind-api") diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/reactive/WebTestClientAutoConfiguration.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/reactive/WebTestClientAutoConfiguration.java index 37cdfd8817..7a33d3a358 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/reactive/WebTestClientAutoConfiguration.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/reactive/WebTestClientAutoConfiguration.java @@ -23,7 +23,6 @@ import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.test.web.reactive.server.WebTestClientBuilderCustomizer; @@ -43,8 +42,8 @@ import org.springframework.web.server.WebHandler; * @author Andy Wilkinson * @since 2.0.0 */ -@AutoConfiguration(after = WebFluxAutoConfiguration.class, - afterName = "org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration") +@AutoConfiguration(afterName = { "org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration", + "org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration" }) @ConditionalOnClass({ WebClient.class, WebTestClient.class }) @Import(WebTestClientSecurityConfiguration.class) @EnableConfigurationProperties diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebFlux.imports b/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebFlux.imports index a17fe0cbf6..8f8cfbd395 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebFlux.imports +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebFlux.imports @@ -5,5 +5,5 @@ optional:org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfigurati optional:org.springframework.boot.mustache.autoconfigure.MustacheAutoConfiguration optional:org.springframework.boot.thymeleaf.autoconfigure.ThymeleafAutoConfiguration optional:org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration -org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration -org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration +org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration +org.springframework.boot.webflux.autoconfigure.error.ErrorWebFluxAutoConfiguration diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/ExampleWebExceptionHandler.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/ExampleWebExceptionHandler.java index 04a6695dc5..aa793e0f98 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/ExampleWebExceptionHandler.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/ExampleWebExceptionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2025 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. @@ -19,7 +19,7 @@ package org.springframework.boot.test.autoconfigure.web.reactive.webclient; import reactor.core.publisher.Mono; import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest; -import org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler; +import org.springframework.boot.webflux.error.ErrorWebExceptionHandler; import org.springframework.core.annotation.Order; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Component; diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/WebFluxTestAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/WebFluxTestAutoConfigurationIntegrationTests.java index 11018e9fb0..ec6cadba65 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/WebFluxTestAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/WebFluxTestAutoConfigurationIntegrationTests.java @@ -20,7 +20,6 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration; import org.springframework.boot.freemarker.autoconfigure.FreeMarkerAutoConfiguration; import org.springframework.boot.mustache.autoconfigure.MustacheAutoConfiguration; import org.springframework.boot.security.oauth2.client.autoconfigure.reactive.ReactiveOAuth2ClientAutoConfiguration; @@ -28,6 +27,7 @@ import org.springframework.boot.security.oauth2.server.resource.autoconfigure.re import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest; import org.springframework.boot.thymeleaf.autoconfigure.ThymeleafAutoConfiguration; import org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.error.ErrorWebFluxAutoConfiguration; import org.springframework.context.ApplicationContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-boot-project/spring-boot-thymeleaf/build.gradle b/spring-boot-project/spring-boot-thymeleaf/build.gradle index fafb00369b..a819db2596 100644 --- a/spring-boot-project/spring-boot-thymeleaf/build.gradle +++ b/spring-boot-project/spring-boot-thymeleaf/build.gradle @@ -14,8 +14,8 @@ dependencies { api("org.springframework:spring-web") optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional(project(":spring-boot-project:spring-boot-webflux")) optional(project(":spring-boot-project:spring-boot-webmvc")) - optional("org.springframework:spring-webflux") optional("org.springframework.security:spring-security-web") optional("org.thymeleaf:thymeleaf") optional("org.thymeleaf.extras:thymeleaf-extras-springsecurity6") @@ -28,7 +28,3 @@ dependencies { testRuntimeOnly("ch.qos.logback:logback-classic") } - -tasks.getByName("checkAutoConfigurationClasses") { - enabled = false -} diff --git a/spring-boot-project/spring-boot-thymeleaf/src/main/java/org/springframework/boot/thymeleaf/autoconfigure/ThymeleafAutoConfiguration.java b/spring-boot-project/spring-boot-thymeleaf/src/main/java/org/springframework/boot/thymeleaf/autoconfigure/ThymeleafAutoConfiguration.java index 1fd5516cfc..95435e00c7 100644 --- a/spring-boot-project/spring-boot-thymeleaf/src/main/java/org/springframework/boot/thymeleaf/autoconfigure/ThymeleafAutoConfiguration.java +++ b/spring-boot-project/spring-boot-thymeleaf/src/main/java/org/springframework/boot/thymeleaf/autoconfigure/ThymeleafAutoConfiguration.java @@ -69,7 +69,7 @@ import org.springframework.web.servlet.view.AbstractCachingViewResolver; * @author Artsiom Yudovin * @since 4.0.0 */ -@AutoConfiguration(afterName = { "org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration", +@AutoConfiguration(afterName = { "org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration", "org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration" }) @EnableConfigurationProperties(ThymeleafProperties.class) @ConditionalOnClass({ TemplateMode.class, SpringTemplateEngine.class }) diff --git a/spring-boot-project/spring-boot-webflux/build.gradle b/spring-boot-project/spring-boot-webflux/build.gradle new file mode 100644 index 0000000000..8f973c3598 --- /dev/null +++ b/spring-boot-project/spring-boot-webflux/build.gradle @@ -0,0 +1,30 @@ +plugins { + id "java-library" + id "org.springframework.boot.auto-configuration" + id "org.springframework.boot.configuration-properties" + id "org.springframework.boot.deployed" + id "org.springframework.boot.optional-dependencies" +} + +description = "Spring Boot WebFlux" + +dependencies { + api(project(":spring-boot-project:spring-boot")) + api("org.springframework:spring-webflux") + + implementation(project(":spring-boot-project:spring-boot-http-codec")) + + optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional(project(":spring-boot-project:spring-boot-validation")) + + testImplementation(project(":spring-boot-project:spring-boot-mustache")) + testImplementation(project(":spring-boot-project:spring-boot-reactor-netty")) + testImplementation(project(":spring-boot-project:spring-boot-test")) + testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) + testImplementation(testFixtures(project(":spring-boot-project:spring-boot"))) + testImplementation("org.aspectj:aspectjweaver") + + testRuntimeOnly("ch.qos.logback:logback-classic") + testRuntimeOnly("com.fasterxml.jackson.core:jackson-databind") + testRuntimeOnly("jakarta.servlet:jakarta.servlet-api") +} diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfiguration.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/HttpHandlerAutoConfiguration.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfiguration.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/HttpHandlerAutoConfiguration.java index b59914875f..72546fcd27 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfiguration.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/HttpHandlerAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import java.util.Collections; import java.util.Map; @@ -42,7 +42,7 @@ import org.springframework.web.server.adapter.WebHttpHandlerBuilder; * @author Brian Clozel * @author Stephane Nicoll * @author Lasse Wulff - * @since 2.0.0 + * @since 4.0.0 */ @AutoConfiguration(after = { WebFluxAutoConfiguration.class }) @ConditionalOnClass({ DispatcherHandler.class, HttpHandler.class }) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ProblemDetailsExceptionHandler.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ProblemDetailsExceptionHandler.java similarity index 89% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ProblemDetailsExceptionHandler.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ProblemDetailsExceptionHandler.java index ffe12848d4..25a9589234 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ProblemDetailsExceptionHandler.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ProblemDetailsExceptionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.reactive.result.method.annotation.ResponseEntityExceptionHandler; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartAutoConfiguration.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartAutoConfiguration.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartAutoConfiguration.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartAutoConfiguration.java index 45ba630071..359e187391 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartAutoConfiguration.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import java.io.IOException; import java.nio.file.Path; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartProperties.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartProperties.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartProperties.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartProperties.java index f3565a74eb..be9887bc7c 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartProperties.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartProperties.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; @@ -30,7 +30,7 @@ import org.springframework.util.unit.DataSize; * and the {@link PartEventHttpMessageReader}. * * @author Chris Bono - * @since 2.6.0 + * @since 4.0.0 */ @ConfigurationProperties("spring.webflux.multipart") public class ReactiveMultipartProperties { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ResourceChainResourceHandlerRegistrationCustomizer.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ResourceChainResourceHandlerRegistrationCustomizer.java similarity index 95% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ResourceChainResourceHandlerRegistrationCustomizer.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ResourceChainResourceHandlerRegistrationCustomizer.java index b9a46fa391..08b3afb022 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ResourceChainResourceHandlerRegistrationCustomizer.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ResourceChainResourceHandlerRegistrationCustomizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import org.springframework.boot.autoconfigure.web.WebProperties.Resources; import org.springframework.web.reactive.config.ResourceChainRegistration; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ResourceHandlerRegistrationCustomizer.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ResourceHandlerRegistrationCustomizer.java similarity index 88% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ResourceHandlerRegistrationCustomizer.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ResourceHandlerRegistrationCustomizer.java index da5f8b4a2f..b2d27b595d 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ResourceHandlerRegistrationCustomizer.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/ResourceHandlerRegistrationCustomizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import org.springframework.web.reactive.config.ResourceHandlerRegistration; @@ -22,7 +22,7 @@ import org.springframework.web.reactive.config.ResourceHandlerRegistration; * Callback interface that can be used to customize {@link ResourceHandlerRegistration}. * * @author Brian Clozel - * @since 2.1.0 + * @since 4.0.0 */ @FunctionalInterface public interface ResourceHandlerRegistrationCustomizer { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfiguration.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfiguration.java similarity index 95% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfiguration.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfiguration.java index fed274aa0f..24723b749b 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfiguration.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import java.time.Duration; import java.util.List; @@ -42,12 +42,13 @@ import org.springframework.boot.autoconfigure.web.WebProperties.Resources; import org.springframework.boot.autoconfigure.web.WebResourcesRuntimeHints; import org.springframework.boot.autoconfigure.web.format.DateTimeFormatters; import org.springframework.boot.autoconfigure.web.format.WebConversionService; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxProperties.Format; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.convert.ApplicationConversionService; +import org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration; import org.springframework.boot.validation.autoconfigure.ValidatorAdapter; import org.springframework.boot.web.codec.CodecCustomizer; -import org.springframework.boot.web.reactive.filter.OrderedHiddenHttpMethodFilter; +import org.springframework.boot.webflux.autoconfigure.WebFluxProperties.Format; +import org.springframework.boot.webflux.filter.OrderedHiddenHttpMethodFilter; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -102,11 +103,12 @@ import org.springframework.web.server.session.WebSessionManager; * @author Artsiom Yudovin * @author Chris Bono * @author Weix Sun - * @since 2.0.0 + * @since 4.0.0 */ -@AutoConfiguration(after = { ReactiveMultipartAutoConfiguration.class, WebSessionIdResolverAutoConfiguration.class }, - afterName = { "org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration", - "org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration" }) +@AutoConfiguration( + after = { ReactiveMultipartAutoConfiguration.class, WebSessionIdResolverAutoConfiguration.class, + CodecsAutoConfiguration.class }, + afterName = "org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration") @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE) @ConditionalOnClass(WebFluxConfigurer.class) @ConditionalOnMissingBean({ WebFluxConfigurationSupport.class }) @@ -289,7 +291,9 @@ public class WebFluxAutoConfiguration { @Bean @Override public Validator webFluxValidator() { - if (!ClassUtils.isPresent("jakarta.validation.Validator", getClass().getClassLoader())) { + if (!ClassUtils.isPresent("jakarta.validation.Validator", getClass().getClassLoader()) + || !ClassUtils.isPresent("org.springframework.boot.validation.autoconfigure.ValidatorAdapter", + getClass().getClassLoader())) { return super.webFluxValidator(); } return ValidatorAdapter.get(getApplicationContext(), getValidator()); diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxProperties.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxProperties.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxProperties.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxProperties.java index dc4e620955..96a9ae40b8 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxProperties.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxProperties.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.util.StringUtils; @@ -24,7 +24,7 @@ import org.springframework.util.StringUtils; * * @author Brian Clozel * @author Vedran Pavic - * @since 2.0.0 + * @since 4.0.0 */ @ConfigurationProperties("spring.webflux") public class WebFluxProperties { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxRegistrations.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxRegistrations.java similarity index 88% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxRegistrations.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxRegistrations.java index 719295fdf4..02f82c8f2d 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxRegistrations.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxRegistrations.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerAdapter; import org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerMapping; @@ -28,8 +28,8 @@ import org.springframework.web.reactive.result.method.annotation.RequestMappingH * to choose from redundant WebFlux components. * * @author Artsiom Yudovin - * @since 2.1.0 - * @see org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration.EnableWebFluxConfiguration + * @since 4.0.0 + * @see org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration.EnableWebFluxConfiguration */ public interface WebFluxRegistrations { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebHttpHandlerBuilderCustomizer.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebHttpHandlerBuilderCustomizer.java similarity index 88% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebHttpHandlerBuilderCustomizer.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebHttpHandlerBuilderCustomizer.java index b416e066c7..1fbc744f5e 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebHttpHandlerBuilderCustomizer.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebHttpHandlerBuilderCustomizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; @@ -22,7 +22,7 @@ import org.springframework.web.server.adapter.WebHttpHandlerBuilder; * Callback interface used to customize a {@link WebHttpHandlerBuilder}. * * @author Lasse Wulff - * @since 3.3.0 + * @since 4.0.0 */ @FunctionalInterface public interface WebHttpHandlerBuilderCustomizer { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebSessionIdResolverAutoConfiguration.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebSessionIdResolverAutoConfiguration.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebSessionIdResolverAutoConfiguration.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebSessionIdResolverAutoConfiguration.java index ae1da0b818..081b0723cd 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebSessionIdResolverAutoConfiguration.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebSessionIdResolverAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import reactor.core.publisher.Mono; @@ -41,7 +41,7 @@ import org.springframework.web.server.session.WebSessionManager; * @author Phillip Webb * @author Brian Clozel * @author Weix Sun - * @since 2.6.0 + * @since 4.0.0 */ @AutoConfiguration @ConditionalOnWebApplication(type = Type.REACTIVE) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WelcomePageRouterFunctionFactory.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WelcomePageRouterFunctionFactory.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WelcomePageRouterFunctionFactory.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WelcomePageRouterFunctionFactory.java index 677c4cc0d1..08be443986 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WelcomePageRouterFunctionFactory.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WelcomePageRouterFunctionFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import java.util.Arrays; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/AbstractErrorWebExceptionHandler.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/AbstractErrorWebExceptionHandler.java index c7315504d5..97a6dfc707 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/AbstractErrorWebExceptionHandler.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive.error; +package org.springframework.boot.webflux.autoconfigure.error; import java.util.Collections; import java.util.Date; @@ -28,8 +28,8 @@ import org.springframework.beans.factory.InitializingBean; import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProviders; import org.springframework.boot.autoconfigure.web.WebProperties.Resources; import org.springframework.boot.web.error.ErrorAttributeOptions; -import org.springframework.boot.web.reactive.error.ErrorAttributes; -import org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler; +import org.springframework.boot.webflux.error.ErrorAttributes; +import org.springframework.boot.webflux.error.ErrorWebExceptionHandler; import org.springframework.context.ApplicationContext; import org.springframework.core.io.Resource; import org.springframework.core.log.LogMessage; @@ -55,7 +55,7 @@ import org.springframework.web.util.HtmlUtils; * @author Brian Clozel * @author Scott Frederick * @author Moritz Halbritter - * @since 2.0.0 + * @since 4.0.0 * @see ErrorAttributes */ public abstract class AbstractErrorWebExceptionHandler implements ErrorWebExceptionHandler, InitializingBean { @@ -81,7 +81,6 @@ public abstract class AbstractErrorWebExceptionHandler implements ErrorWebExcept * @param errorAttributes the error attributes * @param resources the resources configuration properties * @param applicationContext the application context - * @since 2.4.0 */ public AbstractErrorWebExceptionHandler(ErrorAttributes errorAttributes, Resources resources, ApplicationContext applicationContext) { @@ -174,7 +173,6 @@ public abstract class AbstractErrorWebExceptionHandler implements ErrorWebExcept * @param request the source request * @return {@code true} if the path attribute has been requested, {@code false} * otherwise - * @since 3.3.0 */ protected boolean isPathEnabled(ServerRequest request) { return getBooleanParameter(request, "path"); @@ -312,7 +310,6 @@ public abstract class AbstractErrorWebExceptionHandler implements ErrorWebExcept * @param request the request that was being handled * @param response the response that was being sent * @param throwable the error to be logged - * @since 2.2.0 */ protected void logError(ServerRequest request, ServerResponse response, Throwable throwable) { if (logger.isDebugEnabled()) { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/DefaultErrorWebExceptionHandler.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/DefaultErrorWebExceptionHandler.java index 01b615615e..e82296166a 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/DefaultErrorWebExceptionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive.error; +package org.springframework.boot.webflux.autoconfigure.error; import java.nio.charset.StandardCharsets; import java.util.ArrayList; @@ -30,8 +30,8 @@ import org.springframework.boot.autoconfigure.web.ErrorProperties; import org.springframework.boot.autoconfigure.web.WebProperties.Resources; import org.springframework.boot.web.error.ErrorAttributeOptions; import org.springframework.boot.web.error.ErrorAttributeOptions.Include; -import org.springframework.boot.web.reactive.error.DefaultErrorAttributes; -import org.springframework.boot.web.reactive.error.ErrorAttributes; +import org.springframework.boot.webflux.error.DefaultErrorAttributes; +import org.springframework.boot.webflux.error.ErrorAttributes; import org.springframework.context.ApplicationContext; import org.springframework.http.HttpStatus; import org.springframework.http.InvalidMediaTypeException; @@ -78,7 +78,7 @@ import static org.springframework.web.reactive.function.server.RouterFunctions.r * @author Brian Clozel * @author Scott Frederick * @author Moritz Halbritter - * @since 2.0.0 + * @since 4.0.0 */ public class DefaultErrorWebExceptionHandler extends AbstractErrorWebExceptionHandler { @@ -105,7 +105,6 @@ public class DefaultErrorWebExceptionHandler extends AbstractErrorWebExceptionHa * @param resources the resources configuration properties * @param errorProperties the error configuration properties * @param applicationContext the current application context - * @since 2.4.0 */ public DefaultErrorWebExceptionHandler(ErrorAttributes errorAttributes, Resources resources, ErrorProperties errorProperties, ApplicationContext applicationContext) { @@ -227,7 +226,6 @@ public class DefaultErrorWebExceptionHandler extends AbstractErrorWebExceptionHa * @param request the source request * @param produces the media type produced (or {@code MediaType.ALL}) * @return if the path attribute should be included - * @since 3.3.0 */ protected boolean isIncludePath(ServerRequest request, MediaType produces) { return switch (this.errorProperties.getIncludePath()) { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/ErrorWebFluxAutoConfiguration.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/ErrorWebFluxAutoConfiguration.java similarity index 89% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/ErrorWebFluxAutoConfiguration.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/ErrorWebFluxAutoConfiguration.java index 0211637251..db92ba0e35 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/ErrorWebFluxAutoConfiguration.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/ErrorWebFluxAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive.error; +package org.springframework.boot.webflux.autoconfigure.error; import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.autoconfigure.AutoConfiguration; @@ -25,11 +25,11 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplicat import org.springframework.boot.autoconfigure.condition.SearchStrategy; import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.WebProperties; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.boot.web.reactive.error.DefaultErrorAttributes; -import org.springframework.boot.web.reactive.error.ErrorAttributes; -import org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; +import org.springframework.boot.webflux.error.DefaultErrorAttributes; +import org.springframework.boot.webflux.error.ErrorAttributes; +import org.springframework.boot.webflux.error.ErrorWebExceptionHandler; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.core.annotation.Order; @@ -43,7 +43,7 @@ import org.springframework.web.reactive.result.view.ViewResolver; * * @author Brian Clozel * @author Scott Frederick - * @since 2.0.0 + * @since 4.0.0 */ @AutoConfiguration(before = WebFluxAutoConfiguration.class) @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/package-info.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/package-info.java similarity index 83% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/package-info.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/package-info.java index 3d212adb2e..51656b3b8e 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/package-info.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 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. @@ -17,4 +17,4 @@ /** * Auto-configuration for Spring WebFlux error handling. */ -package org.springframework.boot.autoconfigure.web.reactive.error; +package org.springframework.boot.webflux.autoconfigure.error; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/package-info.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/package-info.java similarity index 84% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/package-info.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/package-info.java index 99927c8516..e2728950c2 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/reactive/package-info.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 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. @@ -17,4 +17,4 @@ /** * Auto-configuration for reactive web servers and Spring WebFlux. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributes.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/error/DefaultErrorAttributes.java similarity index 99% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributes.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/error/DefaultErrorAttributes.java index f574c35dd0..a49a056322 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributes.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/error/DefaultErrorAttributes.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.reactive.error; +package org.springframework.boot.webflux.error; import java.io.PrintWriter; import java.io.StringWriter; @@ -61,7 +61,7 @@ import org.springframework.web.server.ServerWebExchange; * @author Moritz Halbritter * @author Yanming Zhou * @author Yongjun Hong - * @since 2.0.0 + * @since 4.0.0 * @see ErrorAttributes */ public class DefaultErrorAttributes implements ErrorAttributes { diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/error/ErrorAttributes.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/error/ErrorAttributes.java similarity index 94% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/error/ErrorAttributes.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/error/ErrorAttributes.java index aab94b4e31..34752aa3ad 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/error/ErrorAttributes.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/error/ErrorAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.reactive.error; +package org.springframework.boot.webflux.error; import java.util.Collections; import java.util.Map; @@ -29,7 +29,7 @@ import org.springframework.web.server.ServerWebExchange; * * @author Brian Clozel * @author Scott Frederick - * @since 2.0.0 + * @since 4.0.0 * @see DefaultErrorAttributes */ public interface ErrorAttributes { diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/error/ErrorWebExceptionHandler.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/error/ErrorWebExceptionHandler.java similarity index 87% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/error/ErrorWebExceptionHandler.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/error/ErrorWebExceptionHandler.java index f755d9d7f8..ea7c91617d 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/error/ErrorWebExceptionHandler.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/error/ErrorWebExceptionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.reactive.error; +package org.springframework.boot.webflux.error; import org.springframework.web.server.WebExceptionHandler; @@ -23,7 +23,7 @@ import org.springframework.web.server.WebExceptionHandler; * errors. * * @author Brian Clozel - * @since 2.0.0 + * @since 4.0.0 */ @FunctionalInterface public interface ErrorWebExceptionHandler extends WebExceptionHandler { diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/error/package-info.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/error/package-info.java similarity index 85% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/error/package-info.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/error/package-info.java index 108290d182..e76a7cb9c9 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/error/package-info.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/error/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 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. @@ -17,4 +17,4 @@ /** * Spring WebFlux error handling infrastructure. */ -package org.springframework.boot.web.reactive.error; +package org.springframework.boot.webflux.error; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/filter/OrderedHiddenHttpMethodFilter.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/filter/OrderedHiddenHttpMethodFilter.java similarity index 91% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/filter/OrderedHiddenHttpMethodFilter.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/filter/OrderedHiddenHttpMethodFilter.java index 978222c7c2..4f13b7d816 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/filter/OrderedHiddenHttpMethodFilter.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/filter/OrderedHiddenHttpMethodFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.reactive.filter; +package org.springframework.boot.webflux.filter; import org.springframework.core.Ordered; import org.springframework.web.filter.reactive.HiddenHttpMethodFilter; @@ -23,7 +23,7 @@ import org.springframework.web.filter.reactive.HiddenHttpMethodFilter; * {@link HiddenHttpMethodFilter} that also implements {@link Ordered}. * * @author Artsiom Yudovin - * @since 2.0.5 + * @since 4.0.0 */ public class OrderedHiddenHttpMethodFilter extends HiddenHttpMethodFilter implements OrderedWebFilter { diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/filter/OrderedWebFilter.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/filter/OrderedWebFilter.java similarity index 88% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/filter/OrderedWebFilter.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/filter/OrderedWebFilter.java index 0daded3303..ccc841c999 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/filter/OrderedWebFilter.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/filter/OrderedWebFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.reactive.filter; +package org.springframework.boot.webflux.filter; import org.springframework.core.Ordered; import org.springframework.web.server.WebFilter; @@ -23,7 +23,7 @@ import org.springframework.web.server.WebFilter; * An {@link Ordered} {@link org.springframework.web.server.WebFilter}. * * @author Phillip Webb - * @since 2.1.0 + * @since 4.0.0 */ public interface OrderedWebFilter extends WebFilter, Ordered { diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/filter/package-info.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/filter/package-info.java similarity index 85% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/filter/package-info.java rename to spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/filter/package-info.java index a8204158b4..f0b913eae4 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/reactive/filter/package-info.java +++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/filter/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 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. @@ -17,4 +17,4 @@ /** * Spring Boot specific {@link org.springframework.web.server.WebFilter} implementations. */ -package org.springframework.boot.web.reactive.filter; +package org.springframework.boot.webflux.filter; diff --git a/spring-boot-project/spring-boot-webflux/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-webflux/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 0000000000..bb00b3730c --- /dev/null +++ b/spring-boot-project/spring-boot-webflux/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -0,0 +1,83 @@ +{ + "groups": [], + "properties": [ + { + "name": "spring.webflux.hiddenmethod.filter.enabled", + "type": "java.lang.Boolean", + "description": "Whether to enable Spring's HiddenHttpMethodFilter.", + "defaultValue": false + }, + { + "name": "spring.webflux.multipart.streaming", + "type": "java.lang.Boolean", + "deprecation": { + "reason": "Replaced by the PartEventHttpMessageReader and the PartEvent API.", + "level": "error" + } + } + ], + "hints": [ + { + "name": "spring.webflux.format.date", + "values": [ + { + "value": "dd/MM/yyyy", + "description": "Example date format. Any format supported by DateTimeFormatter.parse can be used." + }, + { + "value": "iso", + "description": "ISO-8601 extended local date format." + } + ], + "providers": [ + { + "name": "any" + } + ] + }, + { + "name": "spring.webflux.format.date-time", + "values": [ + { + "value": "yyyy-MM-dd HH:mm:ss", + "description": "Example date-time format. Any format supported by DateTimeFormatter.parse can be used." + }, + { + "value": "iso", + "description": "ISO-8601 extended local date-time format." + }, + { + "value": "iso-offset", + "description": "ISO offset date-time format." + } + ], + "providers": [ + { + "name": "any" + } + ] + }, + { + "name": "spring.webflux.format.time", + "values": [ + { + "value": "HH:mm:ss", + "description": "Example time format. Any format supported by DateTimeFormatter.parse can be used." + }, + { + "value": "iso", + "description": "ISO-8601 extended local time format." + }, + { + "value": "iso-offset", + "description": "ISO offset time format." + } + ], + "providers": [ + { + "name": "any" + } + ] + } + ] +} diff --git a/spring-boot-project/spring-boot-webflux/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-webflux/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000000..6803104047 --- /dev/null +++ b/spring-boot-project/spring-boot-webflux/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1,5 @@ +org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration +org.springframework.boot.webflux.autoconfigure.ReactiveMultipartAutoConfiguration +org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration +org.springframework.boot.webflux.autoconfigure.WebSessionIdResolverAutoConfiguration +org.springframework.boot.webflux.autoconfigure.error.ErrorWebFluxAutoConfiguration diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfigurationTests.java b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/HttpHandlerAutoConfigurationTests.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfigurationTests.java rename to spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/HttpHandlerAutoConfigurationTests.java index 1537780e81..ebd0ab3b3e 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/HttpHandlerAutoConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import org.assertj.core.api.InstanceOfAssertFactories; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartAutoConfigurationTests.java b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartAutoConfigurationTests.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartAutoConfigurationTests.java rename to spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartAutoConfigurationTests.java index ae3d0099ce..e8e0f3ba94 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartAutoConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import java.nio.charset.StandardCharsets; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartPropertiesTests.java b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartPropertiesTests.java similarity index 93% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartPropertiesTests.java rename to spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartPropertiesTests.java index 5e0662e246..db3c521bb1 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartPropertiesTests.java +++ b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/ReactiveMultipartPropertiesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfigurationTests.java similarity index 98% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java rename to spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfigurationTests.java index 93df7c4009..27ecbd19db 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfigurationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import java.time.Duration; import java.time.LocalDateTime; @@ -46,12 +46,8 @@ import org.junit.jupiter.params.provider.ValueSource; import org.springframework.aop.support.AopUtils; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.aop.AopAutoConfiguration; import org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration; import org.springframework.boot.autoconfigure.web.ServerProperties; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration.WebFluxConfig; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfigurationTests.OrderedControllerAdviceBeansConfiguration.HighestOrderedControllerAdvice; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfigurationTests.OrderedControllerAdviceBeansConfiguration.LowestOrderedControllerAdvice; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; @@ -60,11 +56,15 @@ import org.springframework.boot.validation.autoconfigure.ValidationAutoConfigura import org.springframework.boot.validation.autoconfigure.ValidatorAdapter; import org.springframework.boot.web.codec.CodecCustomizer; import org.springframework.boot.web.reactive.context.ReactiveWebApplicationContext; -import org.springframework.boot.web.reactive.filter.OrderedHiddenHttpMethodFilter; import org.springframework.boot.web.server.reactive.MockReactiveWebServerFactory; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration.WebFluxConfig; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfigurationTests.OrderedControllerAdviceBeansConfiguration.HighestOrderedControllerAdvice; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfigurationTests.OrderedControllerAdviceBeansConfiguration.LowestOrderedControllerAdvice; +import org.springframework.boot.webflux.filter.OrderedHiddenHttpMethodFilter; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.context.annotation.Import; import org.springframework.context.i18n.LocaleContext; import org.springframework.core.Ordered; @@ -707,7 +707,7 @@ class WebFluxAutoConfigurationTests { @Test void problemDetailsExceptionHandlerDoesNotPreventProxying() { - this.contextRunner.withConfiguration(AutoConfigurations.of(AopAutoConfiguration.class)) + this.contextRunner.withUserConfiguration(AopConfiguration.class) .withBean(ExceptionHandlerInterceptor.class) .withPropertyValues("spring.webflux.problemdetails.enabled:true") .run((context) -> assertThat(context).getBean(ProblemDetailsExceptionHandler.class) @@ -1149,6 +1149,12 @@ class WebFluxAutoConfigurationTests { } + @Configuration(proxyBeanMethods = false) + @EnableAspectJAutoProxy(proxyTargetClass = true) + static class AopConfiguration { + + } + @Configuration(proxyBeanMethods = false) static class CustomApplicationTaskExecutorConfig { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxPropertiesTests.java b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxPropertiesTests.java similarity index 94% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxPropertiesTests.java rename to spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxPropertiesTests.java index 83eb6b20b7..3d355ff7de 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxPropertiesTests.java +++ b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxPropertiesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import java.util.Collections; import java.util.Map; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WelcomePageRouterFunctionFactoryTests.java b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WelcomePageRouterFunctionFactoryTests.java similarity index 99% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WelcomePageRouterFunctionFactoryTests.java rename to spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WelcomePageRouterFunctionFactoryTests.java index 996956eede..b2b4a8c3dd 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WelcomePageRouterFunctionFactoryTests.java +++ b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WelcomePageRouterFunctionFactoryTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive; +package org.springframework.boot.webflux.autoconfigure; import java.nio.charset.StandardCharsets; import java.util.Collections; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerIntegrationTests.java b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/error/DefaultErrorWebExceptionHandlerIntegrationTests.java similarity index 98% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerIntegrationTests.java rename to spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/error/DefaultErrorWebExceptionHandlerIntegrationTests.java index 9c19fe421b..1e55a0e25f 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerIntegrationTests.java +++ b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/error/DefaultErrorWebExceptionHandlerIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive.error; +package org.springframework.boot.webflux.autoconfigure.error; import java.nio.charset.StandardCharsets; import java.util.HashMap; @@ -34,8 +34,6 @@ import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.WebProperties; -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.mustache.autoconfigure.MustacheAutoConfiguration; import org.springframework.boot.reactor.netty.autoconfigure.NettyReactiveWebServerAutoConfiguration; import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplicationContext; @@ -45,9 +43,11 @@ import org.springframework.boot.test.system.OutputCaptureExtension; import org.springframework.boot.testsupport.classpath.resources.WithResource; import org.springframework.boot.web.error.ErrorAttributeOptions; import org.springframework.boot.web.error.ErrorAttributeOptions.Include; -import org.springframework.boot.web.reactive.error.DefaultErrorAttributes; -import org.springframework.boot.web.reactive.error.ErrorAttributes; -import org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler; +import org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration; +import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; +import org.springframework.boot.webflux.error.DefaultErrorAttributes; +import org.springframework.boot.webflux.error.ErrorAttributes; +import org.springframework.boot.webflux.error.ErrorWebExceptionHandler; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerTests.java b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/error/DefaultErrorWebExceptionHandlerTests.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerTests.java rename to spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/error/DefaultErrorWebExceptionHandlerTests.java index 51970676f0..69abfa9a3c 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerTests.java +++ b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/error/DefaultErrorWebExceptionHandlerTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive.error; +package org.springframework.boot.webflux.autoconfigure.error; import java.util.Collections; import java.util.List; @@ -26,7 +26,7 @@ import org.springframework.boot.autoconfigure.web.ErrorProperties; import org.springframework.boot.autoconfigure.web.WebProperties.Resources; import org.springframework.boot.testsupport.classpath.resources.WithResource; import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebApplicationContext; -import org.springframework.boot.web.reactive.error.ErrorAttributes; +import org.springframework.boot.webflux.error.ErrorAttributes; import org.springframework.context.ApplicationContext; import org.springframework.http.MediaType; import org.springframework.http.codec.HttpMessageReader; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DummyBody.java b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/error/DummyBody.java similarity index 86% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DummyBody.java rename to spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/error/DummyBody.java index 7d7db625bb..16d79b8d7d 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DummyBody.java +++ b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/error/DummyBody.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.reactive.error; +package org.springframework.boot.webflux.autoconfigure.error; import jakarta.validation.constraints.NotNull; diff --git a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributesTests.java b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/error/DefaultErrorAttributesTests.java similarity index 99% rename from spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributesTests.java rename to spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/error/DefaultErrorAttributesTests.java index 57dcd768c6..750a8b67f5 100644 --- a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributesTests.java +++ b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/error/DefaultErrorAttributesTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.reactive.error; +package org.springframework.boot.webflux.error; import java.lang.reflect.Method; import java.util.Collections; @@ -270,8 +270,7 @@ class DefaultErrorAttributesTests { Map attributes = this.errorAttributes.getErrorAttributes(buildServerRequest(request, ex), ErrorAttributeOptions.of(Include.MESSAGE, Include.BINDING_ERRORS)); assertThat(attributes.get("message")).asString() - .startsWith("Validation failed for argument at index 0 in method: " - + "int org.springframework.boot.web.reactive.error.DefaultErrorAttributesTests" + .startsWith("Validation failed for argument at index 0 in method: " + "int " + getClass().getName() + ".method(java.lang.String), with 1 error(s)"); assertThat(attributes).containsEntry("errors", org.springframework.boot.web.error.Error.wrap(bindingResult.getAllErrors())); diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/web/reactive/error/templates/error/404.mustache b/spring-boot-project/spring-boot-webflux/src/test/resources/org/springframework/boot/webflux/autoconfigure/error/templates/error/404.mustache similarity index 100% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/web/reactive/error/templates/error/404.mustache rename to spring-boot-project/spring-boot-webflux/src/test/resources/org/springframework/boot/webflux/autoconfigure/error/templates/error/404.mustache diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/web/reactive/error/templates/error/4xx.mustache b/spring-boot-project/spring-boot-webflux/src/test/resources/org/springframework/boot/webflux/autoconfigure/error/templates/error/4xx.mustache similarity index 100% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/web/reactive/error/templates/error/4xx.mustache rename to spring-boot-project/spring-boot-webflux/src/test/resources/org/springframework/boot/webflux/autoconfigure/error/templates/error/4xx.mustache diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-sni-tests/build.gradle b/spring-boot-tests/spring-boot-integration-tests/spring-boot-sni-tests/build.gradle index 936025a388..d8bdac4b95 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-sni-tests/build.gradle +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-sni-tests/build.gradle @@ -18,6 +18,7 @@ dependencies { app project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-web", configuration: "mavenRepository") app project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-webflux", configuration: "mavenRepository") app project(path: ":spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin", configuration: "mavenRepository") + app project(path: ":spring-boot-project:spring-boot-webflux", configuration: "mavenRepository") intTestImplementation(enforcedPlatform(project(":spring-boot-project:spring-boot-parent"))) intTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-sni-tests/spring-boot-sni-reactive-app/build.gradle b/spring-boot-tests/spring-boot-integration-tests/spring-boot-sni-tests/spring-boot-sni-reactive-app/build.gradle index ddd1d6c9f2..992b3ea503 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-sni-tests/spring-boot-sni-reactive-app/build.gradle +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-sni-tests/spring-boot-sni-reactive-app/build.gradle @@ -40,9 +40,7 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-actuator") app(files(sourceSets.main.output)) - app("org.springframework:spring-webflux") { - exclude group: "spring-boot-project", module: "spring-boot-starter-reactor-netty" - } + app("org.springframework.boot:spring-boot-webflux") netty("org.springframework.boot:spring-boot-starter-webflux") tomcat("org.springframework.boot:spring-boot-starter-tomcat") undertow("org.springframework.boot:spring-boot-starter-undertow") diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-profile/src/test/java/smoketest/profile/AttributeInjectionTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-profile/src/test/java/smoketest/profile/AttributeInjectionTests.java index 78a7318010..f3d0a20a86 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-profile/src/test/java/smoketest/profile/AttributeInjectionTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-profile/src/test/java/smoketest/profile/AttributeInjectionTests.java @@ -31,7 +31,7 @@ class AttributeInjectionTests { private org.springframework.boot.webmvc.error.ErrorAttributes errorAttributesServlet; @Autowired(required = false) - private org.springframework.boot.web.reactive.error.ErrorAttributes errorAttributesReactive; + private org.springframework.boot.webflux.error.ErrorAttributes errorAttributesReactive; @Test void contextLoads() {