Skip to content

Commit fbb1ba1

Browse files
committed
Move actuator mappings introspection classes into dedicated packages
Closes gh-9979
1 parent 9da9221 commit fbb1ba1

22 files changed

+71
-50
lines changed
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,20 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.autoconfigure.web;
17+
package org.springframework.boot.actuate.autoconfigure.web.mappings;
1818

1919
import java.util.Collection;
2020
import java.util.Collections;
2121

2222
import org.springframework.beans.factory.ObjectProvider;
2323
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnEnabledEndpoint;
24-
import org.springframework.boot.actuate.web.MappingDescriptionProvider;
25-
import org.springframework.boot.actuate.web.MappingsEndpoint;
26-
import org.springframework.boot.actuate.web.reactive.DispatcherHandlersMappingDescriptionProvider;
27-
import org.springframework.boot.actuate.web.servlet.DispatcherServletsMappingDescriptionProvider;
28-
import org.springframework.boot.actuate.web.servlet.FiltersMappingDescriptionProvider;
29-
import org.springframework.boot.actuate.web.servlet.ServletsMappingDescriptionProvider;
24+
import org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration;
25+
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
26+
import org.springframework.boot.actuate.web.mappings.MappingsEndpoint;
27+
import org.springframework.boot.actuate.web.mappings.reactive.DispatcherHandlersMappingDescriptionProvider;
28+
import org.springframework.boot.actuate.web.mappings.servlet.DispatcherServletsMappingDescriptionProvider;
29+
import org.springframework.boot.actuate.web.mappings.servlet.FiltersMappingDescriptionProvider;
30+
import org.springframework.boot.actuate.web.mappings.servlet.ServletsMappingDescriptionProvider;
3031
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
3132
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
3233
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright 2012-2017 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* Classes for auto-configuration of actuator web request mapping concerns.
19+
*/
20+
package org.springframework.boot.actuate.autoconfigure.web.mappings;

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/spring.factories

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ org.springframework.boot.actuate.autoconfigure.system.DiskSpaceHealthIndicatorAu
4141
org.springframework.boot.actuate.autoconfigure.trace.TraceEndpointAutoConfiguration,\
4242
org.springframework.boot.actuate.autoconfigure.trace.TraceRepositoryAutoConfiguration,\
4343
org.springframework.boot.actuate.autoconfigure.trace.TraceWebFilterAutoConfiguration,\
44-
org.springframework.boot.actuate.autoconfigure.web.MappingsEndpointAutoConfiguration,\
44+
org.springframework.boot.actuate.autoconfigure.web.mappings.MappingsEndpointAutoConfiguration,\
4545
org.springframework.boot.actuate.autoconfigure.web.reactive.ReactiveManagementContextAutoConfiguration,\
4646
org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration,\
4747
org.springframework.boot.actuate.autoconfigure.web.servlet.ServletManagementContextAutoConfiguration

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointReactiveDocumentationTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
import org.junit.Test;
2424
import org.junit.runner.RunWith;
2525

26-
import org.springframework.boot.actuate.web.MappingDescriptionProvider;
27-
import org.springframework.boot.actuate.web.MappingsEndpoint;
28-
import org.springframework.boot.actuate.web.reactive.DispatcherHandlersMappingDescriptionProvider;
26+
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
27+
import org.springframework.boot.actuate.web.mappings.MappingsEndpoint;
28+
import org.springframework.boot.actuate.web.mappings.reactive.DispatcherHandlersMappingDescriptionProvider;
2929
import org.springframework.boot.test.context.SpringBootTest;
3030
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
3131
import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory;

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointServletDocumentationTests.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
import org.junit.Test;
2424
import org.junit.runner.RunWith;
2525

26-
import org.springframework.boot.actuate.web.MappingDescriptionProvider;
27-
import org.springframework.boot.actuate.web.MappingsEndpoint;
28-
import org.springframework.boot.actuate.web.servlet.DispatcherServletsMappingDescriptionProvider;
29-
import org.springframework.boot.actuate.web.servlet.FiltersMappingDescriptionProvider;
30-
import org.springframework.boot.actuate.web.servlet.ServletsMappingDescriptionProvider;
26+
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
27+
import org.springframework.boot.actuate.web.mappings.MappingsEndpoint;
28+
import org.springframework.boot.actuate.web.mappings.servlet.DispatcherServletsMappingDescriptionProvider;
29+
import org.springframework.boot.actuate.web.mappings.servlet.FiltersMappingDescriptionProvider;
30+
import org.springframework.boot.actuate.web.mappings.servlet.ServletsMappingDescriptionProvider;
3131
import org.springframework.boot.test.context.SpringBootTest;
3232
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
3333
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/EndpointAutoConfigurationClasses.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.springframework.boot.actuate.autoconfigure.info.InfoEndpointAutoConfiguration;
3030
import org.springframework.boot.actuate.autoconfigure.management.ThreadDumpEndpointAutoConfiguration;
3131
import org.springframework.boot.actuate.autoconfigure.trace.TraceEndpointAutoConfiguration;
32-
import org.springframework.boot.actuate.autoconfigure.web.MappingsEndpointAutoConfiguration;
32+
import org.springframework.boot.actuate.autoconfigure.web.mappings.MappingsEndpointAutoConfiguration;
3333

3434
/**
3535
* A list of all endpoint auto-configuration classes for use in tests.

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/MappingDescriptionProvider.java renamed to spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/MappingDescriptionProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.web;
17+
package org.springframework.boot.actuate.web.mappings;
1818

1919
import java.util.List;
2020

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/MappingsEndpoint.java renamed to spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/MappingsEndpoint.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.web;
17+
package org.springframework.boot.actuate.web.mappings;
1818

1919
import java.util.Collection;
2020
import java.util.HashMap;

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/package-info.java renamed to spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/package-info.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
*/
1616

1717
/**
18-
* Actuator web support.
18+
* Actuator web request mappings support.
1919
*/
20-
package org.springframework.boot.actuate.web;
20+
package org.springframework.boot.actuate.web.mappings;
+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.web.reactive;
17+
package org.springframework.boot.actuate.web.mappings.reactive;
1818

1919
import org.springframework.web.servlet.DispatcherServlet;
2020

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.web.reactive;
17+
package org.springframework.boot.actuate.web.mappings.reactive;
1818

1919
import java.util.ArrayList;
2020
import java.util.Arrays;
@@ -28,7 +28,7 @@
2828

2929
import reactor.core.publisher.Mono;
3030

31-
import org.springframework.boot.actuate.web.MappingDescriptionProvider;
31+
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
3232
import org.springframework.context.ApplicationContext;
3333
import org.springframework.core.io.Resource;
3434
import org.springframework.web.method.HandlerMethod;

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/servlet/package-info.java renamed to spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/reactive/package-info.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
*/
1616

1717
/**
18-
* Actuator web support using Spring MVC.
18+
* Actuator reactive request mappings support.
1919
*/
20-
package org.springframework.boot.actuate.web.servlet;
20+
package org.springframework.boot.actuate.web.mappings.reactive;

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/servlet/DispatcherServletHandlerMappings.java renamed to spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/DispatcherServletHandlerMappings.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.web.servlet;
17+
package org.springframework.boot.actuate.web.mappings.servlet;
1818

1919
import java.util.Collections;
2020
import java.util.List;
+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.web.servlet;
17+
package org.springframework.boot.actuate.web.mappings.servlet;
1818

1919
import org.springframework.web.servlet.DispatcherServlet;
2020

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.web.servlet;
17+
package org.springframework.boot.actuate.web.mappings.servlet;
1818

1919
import java.util.ArrayList;
2020
import java.util.Collections;
@@ -25,7 +25,7 @@
2525
import java.util.stream.Collectors;
2626
import java.util.stream.Stream;
2727

28-
import org.springframework.boot.actuate.web.MappingDescriptionProvider;
28+
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
2929
import org.springframework.context.ApplicationContext;
3030
import org.springframework.data.rest.webmvc.support.DelegatingHandlerMapping;
3131
import org.springframework.util.ClassUtils;
+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.web.servlet;
17+
package org.springframework.boot.actuate.web.mappings.servlet;
1818

1919
import java.util.Collection;
2020

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/servlet/FiltersMappingDescriptionProvider.java renamed to spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/FiltersMappingDescriptionProvider.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.web.servlet;
17+
package org.springframework.boot.actuate.web.mappings.servlet;
1818

1919
import java.util.Collections;
2020
import java.util.List;
@@ -23,7 +23,7 @@
2323
import javax.servlet.Filter;
2424
import javax.servlet.ServletContext;
2525

26-
import org.springframework.boot.actuate.web.MappingDescriptionProvider;
26+
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
2727
import org.springframework.context.ApplicationContext;
2828
import org.springframework.web.context.WebApplicationContext;
2929

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/servlet/RegistrationMappingDescription.java renamed to spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/RegistrationMappingDescription.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.web.servlet;
17+
package org.springframework.boot.actuate.web.mappings.servlet;
1818

1919
import javax.servlet.Registration;
2020

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.web.servlet;
17+
package org.springframework.boot.actuate.web.mappings.servlet;
1818

1919
import java.util.Collection;
2020

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.web.servlet;
17+
package org.springframework.boot.actuate.web.mappings.servlet;
1818

1919
import java.util.Collections;
2020
import java.util.List;
@@ -23,7 +23,7 @@
2323
import javax.servlet.Servlet;
2424
import javax.servlet.ServletContext;
2525

26-
import org.springframework.boot.actuate.web.MappingDescriptionProvider;
26+
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
2727
import org.springframework.context.ApplicationContext;
2828
import org.springframework.web.context.WebApplicationContext;
2929

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/reactive/package-info.java renamed to spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/package-info.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
*/
1616

1717
/**
18-
* Actuator web support using WebFlux.
18+
* Actuator servlet request mappings support.
1919
*/
20-
package org.springframework.boot.actuate.web.reactive;
20+
package org.springframework.boot.actuate.web.mappings.servlet;

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/MappingsEndpointTests.java renamed to spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/mappings/MappingsEndpointTests.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.web;
17+
package org.springframework.boot.actuate.web.mappings;
1818

1919
import java.util.Collection;
2020
import java.util.Collections;
@@ -29,16 +29,16 @@
2929

3030
import org.junit.Test;
3131

32-
import org.springframework.boot.actuate.web.MappingsEndpoint.ApplicationMappings;
33-
import org.springframework.boot.actuate.web.MappingsEndpoint.ContextMappings;
34-
import org.springframework.boot.actuate.web.reactive.DispatcherHandlerMappingDescription;
35-
import org.springframework.boot.actuate.web.reactive.DispatcherHandlersMappingDescriptionProvider;
36-
import org.springframework.boot.actuate.web.servlet.DispatcherServletMappingDescription;
37-
import org.springframework.boot.actuate.web.servlet.DispatcherServletsMappingDescriptionProvider;
38-
import org.springframework.boot.actuate.web.servlet.FilterRegistrationMappingDescription;
39-
import org.springframework.boot.actuate.web.servlet.FiltersMappingDescriptionProvider;
40-
import org.springframework.boot.actuate.web.servlet.ServletRegistrationMappingDescription;
41-
import org.springframework.boot.actuate.web.servlet.ServletsMappingDescriptionProvider;
32+
import org.springframework.boot.actuate.web.mappings.MappingsEndpoint.ApplicationMappings;
33+
import org.springframework.boot.actuate.web.mappings.MappingsEndpoint.ContextMappings;
34+
import org.springframework.boot.actuate.web.mappings.reactive.DispatcherHandlerMappingDescription;
35+
import org.springframework.boot.actuate.web.mappings.reactive.DispatcherHandlersMappingDescriptionProvider;
36+
import org.springframework.boot.actuate.web.mappings.servlet.DispatcherServletMappingDescription;
37+
import org.springframework.boot.actuate.web.mappings.servlet.DispatcherServletsMappingDescriptionProvider;
38+
import org.springframework.boot.actuate.web.mappings.servlet.FilterRegistrationMappingDescription;
39+
import org.springframework.boot.actuate.web.mappings.servlet.FiltersMappingDescriptionProvider;
40+
import org.springframework.boot.actuate.web.mappings.servlet.ServletRegistrationMappingDescription;
41+
import org.springframework.boot.actuate.web.mappings.servlet.ServletsMappingDescriptionProvider;
4242
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
4343
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
4444
import org.springframework.context.ApplicationContext;

0 commit comments

Comments
 (0)