Skip to content

Commit

Permalink
Deprecate ControllerEndpointsSupplier and ExposableControllerEndpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
cms04 authored and wilkinsona committed Jul 25, 2024
1 parent fd58261 commit e350164
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
Expand Down Expand Up @@ -107,6 +107,7 @@ public CloudFoundryInfoEndpointWebExtension cloudFoundryInfoEndpointWebExtension
}

@Bean
@SuppressWarnings("removal")
public CloudFoundryWebFluxEndpointHandlerMapping cloudFoundryWebFluxEndpointHandlerMapping(
ParameterValueMapper parameterMapper, EndpointMediaTypes endpointMediaTypes,
WebClient.Builder webClientBuilder, ControllerEndpointsSupplier controllerEndpointsSupplier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public IncludeExcludeEndpointFilter<ExposableWebEndpoint> webExposeExcludeProper
}

@Bean
@SuppressWarnings("removal")
public IncludeExcludeEndpointFilter<ExposableControllerEndpoint> controllerExposeExcludePropertyEndpointFilter() {
WebEndpointProperties.Exposure exposure = this.properties.getExposure();
return new IncludeExcludeEndpointFilter<>(ExposableControllerEndpoint.class, exposure.getInclude(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
Expand Down Expand Up @@ -89,6 +89,7 @@ public class WebFluxEndpointManagementContextConfiguration {

@Bean
@ConditionalOnMissingBean
@SuppressWarnings("removal")
public WebFluxEndpointHandlerMapping webEndpointReactiveHandlerMapping(WebEndpointsSupplier webEndpointsSupplier,
ControllerEndpointsSupplier controllerEndpointsSupplier, EndpointMediaTypes endpointMediaTypes,
CorsEndpointProperties corsProperties, WebEndpointProperties webEndpointProperties,
Expand Down Expand Up @@ -128,6 +129,7 @@ public AdditionalHealthEndpointPathsWebFluxHandlerMapping managementHealthEndpoi

@Bean
@ConditionalOnMissingBean
@SuppressWarnings("removal")
public ControllerEndpointHandlerMapping controllerEndpointHandlerMapping(
ControllerEndpointsSupplier controllerEndpointsSupplier, CorsEndpointProperties corsProperties,
WebEndpointProperties webEndpointProperties) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public AdditionalHealthEndpointPathsWebMvcHandlerMapping managementHealthEndpoin

@Bean
@ConditionalOnMissingBean
@SuppressWarnings("removal")
public ControllerEndpointHandlerMapping controllerEndpointHandlerMapping(
ControllerEndpointsSupplier controllerEndpointsSupplier, CorsEndpointProperties corsProperties,
WebEndpointProperties webEndpointProperties) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 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.
Expand All @@ -23,8 +23,11 @@
*
* @author Phillip Webb
* @since 2.0.0
* @deprecated since 3.3.0 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
*/
@FunctionalInterface
@Deprecated(since = "3.3.0", forRemoval = true)
@SuppressWarnings("removal")
public interface ControllerEndpointsSupplier extends EndpointsSupplier<ExposableControllerEndpoint> {

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 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.
Expand Down Expand Up @@ -28,6 +28,7 @@
*
* @author Phillip Webb
*/
@SuppressWarnings("removal")
class DiscoveredControllerEndpoint extends AbstractDiscoveredEndpoint<Operation>
implements ExposableControllerEndpoint {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 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.
Expand Down Expand Up @@ -28,7 +28,9 @@
*
* @author Phillip Webb
* @since 2.0.0
* @deprecated since 3.3.0 in favor of {@code @Endpoint} and {@code @WebEndpoint} support
*/
@Deprecated(since = "3.3.0", forRemoval = true)
public interface ExposableControllerEndpoint extends ExposableEndpoint<Operation>, PathMappedEndpoint {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
* @author Phillip Webb
* @since 2.0.0
*/
@SuppressWarnings("removal")
public class ControllerEndpointHandlerMapping extends RequestMappingHandlerMapping {

private final EndpointMapping endpointMapping;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* @author Phillip Webb
* @since 2.0.0
*/
@SuppressWarnings("removal")
public class ControllerEndpointHandlerMapping extends RequestMappingHandlerMapping {

private final EndpointMapping endpointMapping;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
*
* @author Andy Wilkinson
*/
@SuppressWarnings("removal")
class EndpointLinksResolverTests {

@Test
Expand Down

0 comments on commit e350164

Please sign in to comment.