Skip to content

Commit e350164

Browse files
cms04wilkinsona
authored andcommitted
Deprecate ControllerEndpointsSupplier and ExposableControllerEndpoint
See gh-41596
1 parent fd58261 commit e350164

File tree

10 files changed

+19
-5
lines changed

10 files changed

+19
-5
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -107,6 +107,7 @@ public CloudFoundryInfoEndpointWebExtension cloudFoundryInfoEndpointWebExtension
107107
}
108108

109109
@Bean
110+
@SuppressWarnings("removal")
110111
public CloudFoundryWebFluxEndpointHandlerMapping cloudFoundryWebFluxEndpointHandlerMapping(
111112
ParameterValueMapper parameterMapper, EndpointMediaTypes endpointMediaTypes,
112113
WebClient.Builder webClientBuilder, ControllerEndpointsSupplier controllerEndpointsSupplier,

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointAutoConfiguration.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ public IncludeExcludeEndpointFilter<ExposableWebEndpoint> webExposeExcludeProper
115115
}
116116

117117
@Bean
118+
@SuppressWarnings("removal")
118119
public IncludeExcludeEndpointFilter<ExposableControllerEndpoint> controllerExposeExcludePropertyEndpointFilter() {
119120
WebEndpointProperties.Exposure exposure = this.properties.getExposure();
120121
return new IncludeExcludeEndpointFilter<>(ExposableControllerEndpoint.class, exposure.getInclude(),

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -89,6 +89,7 @@ public class WebFluxEndpointManagementContextConfiguration {
8989

9090
@Bean
9191
@ConditionalOnMissingBean
92+
@SuppressWarnings("removal")
9293
public WebFluxEndpointHandlerMapping webEndpointReactiveHandlerMapping(WebEndpointsSupplier webEndpointsSupplier,
9394
ControllerEndpointsSupplier controllerEndpointsSupplier, EndpointMediaTypes endpointMediaTypes,
9495
CorsEndpointProperties corsProperties, WebEndpointProperties webEndpointProperties,
@@ -128,6 +129,7 @@ public AdditionalHealthEndpointPathsWebFluxHandlerMapping managementHealthEndpoi
128129

129130
@Bean
130131
@ConditionalOnMissingBean
132+
@SuppressWarnings("removal")
131133
public ControllerEndpointHandlerMapping controllerEndpointHandlerMapping(
132134
ControllerEndpointsSupplier controllerEndpointsSupplier, CorsEndpointProperties corsProperties,
133135
WebEndpointProperties webEndpointProperties) {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ public AdditionalHealthEndpointPathsWebMvcHandlerMapping managementHealthEndpoin
124124

125125
@Bean
126126
@ConditionalOnMissingBean
127+
@SuppressWarnings("removal")
127128
public ControllerEndpointHandlerMapping controllerEndpointHandlerMapping(
128129
ControllerEndpointsSupplier controllerEndpointsSupplier, CorsEndpointProperties corsProperties,
129130
WebEndpointProperties webEndpointProperties) {

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/ControllerEndpointsSupplier.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,8 +23,11 @@
2323
*
2424
* @author Phillip Webb
2525
* @since 2.0.0
26+
* @deprecated since 3.3.0 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
2627
*/
2728
@FunctionalInterface
29+
@Deprecated(since = "3.3.0", forRemoval = true)
30+
@SuppressWarnings("removal")
2831
public interface ControllerEndpointsSupplier extends EndpointsSupplier<ExposableControllerEndpoint> {
2932

3033
}

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/DiscoveredControllerEndpoint.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@
2828
*
2929
* @author Phillip Webb
3030
*/
31+
@SuppressWarnings("removal")
3132
class DiscoveredControllerEndpoint extends AbstractDiscoveredEndpoint<Operation>
3233
implements ExposableControllerEndpoint {
3334

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/ExposableControllerEndpoint.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,7 +28,9 @@
2828
*
2929
* @author Phillip Webb
3030
* @since 2.0.0
31+
* @deprecated since 3.3.0 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
3132
*/
33+
@Deprecated(since = "3.3.0", forRemoval = true)
3234
public interface ExposableControllerEndpoint extends ExposableEndpoint<Operation>, PathMappedEndpoint {
3335

3436
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
* @author Phillip Webb
4343
* @since 2.0.0
4444
*/
45+
@SuppressWarnings("removal")
4546
public class ControllerEndpointHandlerMapping extends RequestMappingHandlerMapping {
4647

4748
private final EndpointMapping endpointMapping;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
* @author Phillip Webb
4444
* @since 2.0.0
4545
*/
46+
@SuppressWarnings("removal")
4647
public class ControllerEndpointHandlerMapping extends RequestMappingHandlerMapping {
4748

4849
private final EndpointMapping endpointMapping;

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/EndpointLinksResolverTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
*
3838
* @author Andy Wilkinson
3939
*/
40+
@SuppressWarnings("removal")
4041
class EndpointLinksResolverTests {
4142

4243
@Test

0 commit comments

Comments
 (0)