Skip to content

Commit 93e5b3a

Browse files
committed
Deprecate ControllerEndpointHandlerMapping for MVC and WebFlux
Closes gh-42498
1 parent 9ece00b commit 93e5b3a

File tree

8 files changed

+24
-12
lines changed

8 files changed

+24
-12
lines changed

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/reactive/WebFluxEndpointManagementContextConfiguration.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
import org.springframework.boot.actuate.endpoint.web.WebEndpointsSupplier;
4848
import org.springframework.boot.actuate.endpoint.web.WebServerNamespace;
4949
import org.springframework.boot.actuate.endpoint.web.reactive.AdditionalHealthEndpointPathsWebFluxHandlerMapping;
50-
import org.springframework.boot.actuate.endpoint.web.reactive.ControllerEndpointHandlerMapping;
5150
import org.springframework.boot.actuate.endpoint.web.reactive.WebFluxEndpointHandlerMapping;
5251
import org.springframework.boot.actuate.health.HealthEndpoint;
5352
import org.springframework.boot.actuate.health.HealthEndpointGroups;
@@ -129,12 +128,13 @@ public AdditionalHealthEndpointPathsWebFluxHandlerMapping managementHealthEndpoi
129128
@Bean
130129
@ConditionalOnMissingBean
131130
@SuppressWarnings("removal")
132-
public ControllerEndpointHandlerMapping controllerEndpointHandlerMapping(
131+
@Deprecated(since = "3.3.5", forRemoval = true)
132+
public org.springframework.boot.actuate.endpoint.web.reactive.ControllerEndpointHandlerMapping controllerEndpointHandlerMapping(
133133
org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpointsSupplier controllerEndpointsSupplier,
134134
CorsEndpointProperties corsProperties, WebEndpointProperties webEndpointProperties) {
135135
EndpointMapping endpointMapping = new EndpointMapping(webEndpointProperties.getBasePath());
136-
return new ControllerEndpointHandlerMapping(endpointMapping, controllerEndpointsSupplier.getEndpoints(),
137-
corsProperties.toCorsConfiguration());
136+
return new org.springframework.boot.actuate.endpoint.web.reactive.ControllerEndpointHandlerMapping(
137+
endpointMapping, controllerEndpointsSupplier.getEndpoints(), corsProperties.toCorsConfiguration());
138138
}
139139

140140
@Bean

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/servlet/WebMvcEndpointManagementContextConfiguration.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
import org.springframework.boot.actuate.endpoint.web.WebEndpointsSupplier;
4444
import org.springframework.boot.actuate.endpoint.web.WebServerNamespace;
4545
import org.springframework.boot.actuate.endpoint.web.servlet.AdditionalHealthEndpointPathsWebMvcHandlerMapping;
46-
import org.springframework.boot.actuate.endpoint.web.servlet.ControllerEndpointHandlerMapping;
4746
import org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping;
4847
import org.springframework.boot.actuate.health.HealthEndpoint;
4948
import org.springframework.boot.actuate.health.HealthEndpointGroups;
@@ -124,12 +123,13 @@ public AdditionalHealthEndpointPathsWebMvcHandlerMapping managementHealthEndpoin
124123
@Bean
125124
@ConditionalOnMissingBean
126125
@SuppressWarnings("removal")
127-
public ControllerEndpointHandlerMapping controllerEndpointHandlerMapping(
126+
@Deprecated(since = "3.3.5", forRemoval = true)
127+
public org.springframework.boot.actuate.endpoint.web.servlet.ControllerEndpointHandlerMapping controllerEndpointHandlerMapping(
128128
org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpointsSupplier controllerEndpointsSupplier,
129129
CorsEndpointProperties corsProperties, WebEndpointProperties webEndpointProperties) {
130130
EndpointMapping endpointMapping = new EndpointMapping(webEndpointProperties.getBasePath());
131-
return new ControllerEndpointHandlerMapping(endpointMapping, controllerEndpointsSupplier.getEndpoints(),
132-
corsProperties.toCorsConfiguration());
131+
return new org.springframework.boot.actuate.endpoint.web.servlet.ControllerEndpointHandlerMapping(
132+
endpointMapping, controllerEndpointsSupplier.getEndpoints(), corsProperties.toCorsConfiguration());
133133
}
134134

135135
@Bean

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/ControllerEndpointHandlerMapping.java

+2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
*
4242
* @author Phillip Webb
4343
* @since 2.0.0
44+
* @deprecated since 3.3.5 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
4445
*/
46+
@Deprecated(since = "3.3.5", forRemoval = true)
4547
@SuppressWarnings("removal")
4648
public class ControllerEndpointHandlerMapping extends RequestMappingHandlerMapping {
4749

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/ControllerEndpointHandlerMapping.java

+2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@
4242
*
4343
* @author Phillip Webb
4444
* @since 2.0.0
45+
* @deprecated since 3.3.5 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
4546
*/
47+
@Deprecated(since = "3.3.5", forRemoval = true)
4648
@SuppressWarnings("removal")
4749
public class ControllerEndpointHandlerMapping extends RequestMappingHandlerMapping {
4850

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/ControllerEndpointHandlerMappingIntegrationTests.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@
5757
*
5858
* @author Phillip Webb
5959
* @author Stephane Nicoll
60+
* @deprecated since 3.3.5 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
6061
*/
61-
@SuppressWarnings({ "deprecation", "removal" })
62+
@SuppressWarnings("removal")
63+
@Deprecated(since = "3.3.5", forRemoval = true)
6264
class ControllerEndpointHandlerMappingIntegrationTests {
6365

6466
private final ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner(

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/ControllerEndpointHandlerMappingTests.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@
4545
*
4646
* @author Phillip Webb
4747
* @author Stephane Nicoll
48+
* @deprecated since 3.3.5 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
4849
*/
49-
@SuppressWarnings({ "deprecation", "removal" })
50+
@Deprecated(since = "3.3.5", forRemoval = true)
51+
@SuppressWarnings("removal")
5052
class ControllerEndpointHandlerMappingTests {
5153

5254
private final StaticApplicationContext context = new StaticApplicationContext();

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/ControllerEndpointHandlerMappingIntegrationTests.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@
5656
*
5757
* @author Phillip Webb
5858
* @author Stephane Nicoll
59+
* @deprecated since 3.3.5 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
5960
*/
60-
@SuppressWarnings({ "deprecation", "removal" })
61+
@Deprecated(since = "3.3.5", forRemoval = true)
62+
@SuppressWarnings("removal")
6163
class ControllerEndpointHandlerMappingIntegrationTests {
6264

6365
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner(

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/ControllerEndpointHandlerMappingTests.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@
4242
*
4343
* @author Phillip Webb
4444
* @author Stephane Nicoll
45+
* @deprecated since 3.3.5 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
4546
*/
46-
@SuppressWarnings({ "deprecation", "removal" })
47+
@Deprecated(since = "3.3.5", forRemoval = true)
48+
@SuppressWarnings("removal")
4749
class ControllerEndpointHandlerMappingTests {
4850

4951
private final StaticApplicationContext context = new StaticApplicationContext();

0 commit comments

Comments
 (0)