Skip to content

Commit

Permalink
Deprecate ControllerEndpointHandlerMapping for MVC and WebFlux
Browse files Browse the repository at this point in the history
Closes gh-42498
  • Loading branch information
wilkinsona committed Oct 2, 2024
1 parent 9ece00b commit 93e5b3a
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import org.springframework.boot.actuate.endpoint.web.WebEndpointsSupplier;
import org.springframework.boot.actuate.endpoint.web.WebServerNamespace;
import org.springframework.boot.actuate.endpoint.web.reactive.AdditionalHealthEndpointPathsWebFluxHandlerMapping;
import org.springframework.boot.actuate.endpoint.web.reactive.ControllerEndpointHandlerMapping;
import org.springframework.boot.actuate.endpoint.web.reactive.WebFluxEndpointHandlerMapping;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.HealthEndpointGroups;
Expand Down Expand Up @@ -129,12 +128,13 @@ public AdditionalHealthEndpointPathsWebFluxHandlerMapping managementHealthEndpoi
@Bean
@ConditionalOnMissingBean
@SuppressWarnings("removal")
public ControllerEndpointHandlerMapping controllerEndpointHandlerMapping(
@Deprecated(since = "3.3.5", forRemoval = true)
public org.springframework.boot.actuate.endpoint.web.reactive.ControllerEndpointHandlerMapping controllerEndpointHandlerMapping(
org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpointsSupplier controllerEndpointsSupplier,
CorsEndpointProperties corsProperties, WebEndpointProperties webEndpointProperties) {
EndpointMapping endpointMapping = new EndpointMapping(webEndpointProperties.getBasePath());
return new ControllerEndpointHandlerMapping(endpointMapping, controllerEndpointsSupplier.getEndpoints(),
corsProperties.toCorsConfiguration());
return new org.springframework.boot.actuate.endpoint.web.reactive.ControllerEndpointHandlerMapping(
endpointMapping, controllerEndpointsSupplier.getEndpoints(), corsProperties.toCorsConfiguration());
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.springframework.boot.actuate.endpoint.web.WebEndpointsSupplier;
import org.springframework.boot.actuate.endpoint.web.WebServerNamespace;
import org.springframework.boot.actuate.endpoint.web.servlet.AdditionalHealthEndpointPathsWebMvcHandlerMapping;
import org.springframework.boot.actuate.endpoint.web.servlet.ControllerEndpointHandlerMapping;
import org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.HealthEndpointGroups;
Expand Down Expand Up @@ -124,12 +123,13 @@ public AdditionalHealthEndpointPathsWebMvcHandlerMapping managementHealthEndpoin
@Bean
@ConditionalOnMissingBean
@SuppressWarnings("removal")
public ControllerEndpointHandlerMapping controllerEndpointHandlerMapping(
@Deprecated(since = "3.3.5", forRemoval = true)
public org.springframework.boot.actuate.endpoint.web.servlet.ControllerEndpointHandlerMapping controllerEndpointHandlerMapping(
org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpointsSupplier controllerEndpointsSupplier,
CorsEndpointProperties corsProperties, WebEndpointProperties webEndpointProperties) {
EndpointMapping endpointMapping = new EndpointMapping(webEndpointProperties.getBasePath());
return new ControllerEndpointHandlerMapping(endpointMapping, controllerEndpointsSupplier.getEndpoints(),
corsProperties.toCorsConfiguration());
return new org.springframework.boot.actuate.endpoint.web.servlet.ControllerEndpointHandlerMapping(
endpointMapping, controllerEndpointsSupplier.getEndpoints(), corsProperties.toCorsConfiguration());
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
*
* @author Phillip Webb
* @since 2.0.0
* @deprecated since 3.3.5 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
*/
@Deprecated(since = "3.3.5", forRemoval = true)
@SuppressWarnings("removal")
public class ControllerEndpointHandlerMapping extends RequestMappingHandlerMapping {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
*
* @author Phillip Webb
* @since 2.0.0
* @deprecated since 3.3.5 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
*/
@Deprecated(since = "3.3.5", forRemoval = true)
@SuppressWarnings("removal")
public class ControllerEndpointHandlerMapping extends RequestMappingHandlerMapping {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@
*
* @author Phillip Webb
* @author Stephane Nicoll
* @deprecated since 3.3.5 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
*/
@SuppressWarnings({ "deprecation", "removal" })
@SuppressWarnings("removal")
@Deprecated(since = "3.3.5", forRemoval = true)
class ControllerEndpointHandlerMappingIntegrationTests {

private final ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@
*
* @author Phillip Webb
* @author Stephane Nicoll
* @deprecated since 3.3.5 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
*/
@SuppressWarnings({ "deprecation", "removal" })
@Deprecated(since = "3.3.5", forRemoval = true)
@SuppressWarnings("removal")
class ControllerEndpointHandlerMappingTests {

private final StaticApplicationContext context = new StaticApplicationContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@
*
* @author Phillip Webb
* @author Stephane Nicoll
* @deprecated since 3.3.5 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
*/
@SuppressWarnings({ "deprecation", "removal" })
@Deprecated(since = "3.3.5", forRemoval = true)
@SuppressWarnings("removal")
class ControllerEndpointHandlerMappingIntegrationTests {

private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@
*
* @author Phillip Webb
* @author Stephane Nicoll
* @deprecated since 3.3.5 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
*/
@SuppressWarnings({ "deprecation", "removal" })
@Deprecated(since = "3.3.5", forRemoval = true)
@SuppressWarnings("removal")
class ControllerEndpointHandlerMappingTests {

private final StaticApplicationContext context = new StaticApplicationContext();
Expand Down

0 comments on commit 93e5b3a

Please sign in to comment.