Browse Source

Reduce dependencies of spring-boot-actuator

See gh-46071
pull/46230/head
Andy Wilkinson 7 months ago
parent
commit
a50c75b3e3
  1. 1
      settings.gradle
  2. 2
      spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/web/tomcat/TomcatMetricsAutoConfiguration.java
  3. 4
      spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/mappings/MappingsEndpointAutoConfiguration.java
  4. 2
      spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/tomcat/TomcatMetricsAutoConfigurationTests.java
  5. 2
      spring-boot-project/spring-boot-actuator-docs/src/test/java/org/springframework/boot/actuate/docs/web/mappings/MappingsEndpointReactiveDocumentationTests.java
  6. 2
      spring-boot-project/spring-boot-actuator-docs/src/test/java/org/springframework/boot/actuate/docs/web/mappings/MappingsEndpointServletDocumentationTests.java
  7. 56
      spring-boot-project/spring-boot-actuator-integration-tests/build.gradle
  8. 4
      spring-boot-project/spring-boot-actuator-integration-tests/src/main/resources/META-INF/additional-spring-configuration-metadata.json
  9. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  10. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/audit/AuditEventsEndpointWebIntegrationTests.java
  11. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpointWebIntegrationTests.java
  12. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/AbstractWebEndpointIntegrationTests.java
  13. 80
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/BaseConfiguration.java
  14. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/jersey/JerseyWebEndpointIntegrationTests.java
  15. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/ControllerEndpointHandlerMappingIntegrationTests.java
  16. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointIntegrationTests.java
  17. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/ControllerEndpointHandlerMappingIntegrationTests.java
  18. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/MvcWebEndpointIntegrationTests.java
  19. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointWebIntegrationTests.java
  20. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/health/HealthEndpointWebIntegrationTests.java
  21. 92
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/health/TestHealthEndpointGroup.java
  22. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/info/InfoEndpointWebIntegrationTests.java
  23. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointWebIntegrationTests.java
  24. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java
  25. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/management/HeapDumpWebEndpointWebIntegrationTests.java
  26. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/management/ThreadDumpEndpointWebIntegrationTests.java
  27. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusScrapeEndpointIntegrationTests.java
  28. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/sbom/SbomEndpointCycloneDxWebIntegrationTests.java
  29. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/sbom/SbomEndpointSpdxWebIntegrationTests.java
  30. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/sbom/SbomEndpointSyftWebIntegrationTests.java
  31. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/sbom/SbomEndpointWebIntegrationTests.java
  32. 12
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/web/mappings/MappingsEndpointIntegrationTests.java
  33. 4615
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/resources/org/springframework/boot/actuate/sbom/cyclonedx.json
  34. 3909
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/resources/org/springframework/boot/actuate/sbom/spdx.json
  35. 7525
      spring-boot-project/spring-boot-actuator-integration-tests/src/test/resources/org/springframework/boot/actuate/sbom/syft.json
  36. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/testFixtures/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTest.java
  37. 0
      spring-boot-project/spring-boot-actuator-integration-tests/src/testFixtures/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTestInvocationContextProvider.java
  38. 20
      spring-boot-project/spring-boot-actuator/build.gradle
  39. 24
      spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/BaseConfiguration.java
  40. 2
      spring-boot-project/spring-boot-cache/build.gradle
  41. 2
      spring-boot-project/spring-boot-integration/build.gradle
  42. 2
      spring-boot-project/spring-boot-metrics/build.gradle
  43. 2
      spring-boot-project/spring-boot-quartz/build.gradle
  44. 2
      spring-boot-project/spring-boot-session/build.gradle
  45. 1
      spring-boot-project/spring-boot-tomcat/build.gradle
  46. 4
      spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/actuate/metrics/TomcatMetricsBinder.java
  47. 4
      spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/actuate/metrics/package-info.java
  48. 2
      spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/actuate/metrics/web/tomcat/TomcatMetricsBinderTests.java
  49. 1
      spring-boot-project/spring-boot-webflux/build.gradle
  50. 8
      spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/mappings/DispatcherHandlerMappingDescription.java
  51. 4
      spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/mappings/DispatcherHandlerMappingDetails.java
  52. 6
      spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/mappings/DispatcherHandlersMappingDescriptionProvider.java
  53. 4
      spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/mappings/HandlerFunctionDescription.java
  54. 4
      spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/mappings/RequestMappingConditionsDescription.java
  55. 2
      spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/mappings/package-info.java
  56. 4
      spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/mappings/DispatcherHandlersMappingDescriptionProviderTests.java
  57. 3
      spring-boot-project/spring-boot-webmvc/build.gradle
  58. 2
      spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/DispatcherServletHandlerMappings.java
  59. 4
      spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/DispatcherServletMappingDescription.java
  60. 4
      spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/DispatcherServletMappingDetails.java
  61. 6
      spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/DispatcherServletsMappingDescriptionProvider.java
  62. 4
      spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/HandlerFunctionDescription.java
  63. 4
      spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/RequestMappingConditionsDescription.java
  64. 20
      spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/package-info.java
  65. 4
      spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/mappings/DispatcherServletsMappingDescriptionProviderTests.java

1
settings.gradle

@ -61,6 +61,7 @@ include "spring-boot-project:spring-boot-actuator" @@ -61,6 +61,7 @@ include "spring-boot-project:spring-boot-actuator"
include "spring-boot-project:spring-boot-actuator-autoconfigure"
include "spring-boot-project:spring-boot-actuator-autoconfigure-all"
include "spring-boot-project:spring-boot-actuator-docs"
include "spring-boot-project:spring-boot-actuator-integration-tests"
include "spring-boot-project:spring-boot-amqp"
include "spring-boot-project:spring-boot-artemis"
include "spring-boot-project:spring-boot-autoconfigure"

2
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/web/tomcat/TomcatMetricsAutoConfiguration.java

@ -20,7 +20,6 @@ import io.micrometer.core.instrument.MeterRegistry; @@ -20,7 +20,6 @@ import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.binder.tomcat.TomcatMetrics;
import org.apache.catalina.Manager;
import org.springframework.boot.actuate.metrics.web.tomcat.TomcatMetricsBinder;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
@ -29,6 +28,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean @@ -29,6 +28,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
import org.springframework.boot.tomcat.TomcatWebServer;
import org.springframework.boot.tomcat.actuate.metrics.TomcatMetricsBinder;
import org.springframework.context.annotation.Bean;
/**

4
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/mappings/MappingsEndpointAutoConfiguration.java

@ -20,8 +20,6 @@ import org.springframework.beans.factory.ObjectProvider; @@ -20,8 +20,6 @@ import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint;
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.MappingsEndpoint;
import org.springframework.boot.actuate.web.mappings.reactive.DispatcherHandlersMappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.servlet.DispatcherServletsMappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.servlet.FiltersMappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.servlet.ServletsMappingDescriptionProvider;
import org.springframework.boot.autoconfigure.AutoConfiguration;
@ -30,6 +28,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; @@ -30,6 +28,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.webflux.actuate.mappings.DispatcherHandlersMappingDescriptionProvider;
import org.springframework.boot.webmvc.actuate.mappings.DispatcherServletsMappingDescriptionProvider;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

2
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/tomcat/TomcatMetricsAutoConfigurationTests.java

@ -26,12 +26,12 @@ import org.apache.tomcat.util.modeler.Registry; @@ -26,12 +26,12 @@ import org.apache.tomcat.util.modeler.Registry;
import org.junit.jupiter.api.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.metrics.web.tomcat.TomcatMetricsBinder;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.tomcat.TomcatWebServer;
import org.springframework.boot.tomcat.actuate.metrics.TomcatMetricsBinder;
import org.springframework.boot.tomcat.autoconfigure.reactive.TomcatReactiveWebServerAutoConfiguration;
import org.springframework.boot.tomcat.autoconfigure.servlet.TomcatServletWebServerAutoConfiguration;
import org.springframework.boot.tomcat.reactive.TomcatReactiveWebServerFactory;

2
spring-boot-project/spring-boot-actuator-docs/src/test/java/org/springframework/boot/actuate/docs/web/mappings/MappingsEndpointReactiveDocumentationTests.java

@ -28,11 +28,11 @@ import org.junit.jupiter.api.extension.ExtendWith; @@ -28,11 +28,11 @@ import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.actuate.docs.AbstractEndpointDocumentationTests;
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.MappingsEndpoint;
import org.springframework.boot.actuate.web.mappings.reactive.DispatcherHandlersMappingDescriptionProvider;
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.web.server.test.LocalServerPort;
import org.springframework.boot.webflux.actuate.mappings.DispatcherHandlersMappingDescriptionProvider;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

2
spring-boot-project/spring-boot-actuator-docs/src/test/java/org/springframework/boot/actuate/docs/web/mappings/MappingsEndpointServletDocumentationTests.java

@ -28,13 +28,13 @@ import org.junit.jupiter.api.extension.ExtendWith; @@ -28,13 +28,13 @@ import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.actuate.docs.AbstractEndpointDocumentationTests;
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.MappingsEndpoint;
import org.springframework.boot.actuate.web.mappings.servlet.DispatcherServletsMappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.servlet.FiltersMappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.servlet.ServletsMappingDescriptionProvider;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
import org.springframework.boot.web.server.test.LocalServerPort;
import org.springframework.boot.webmvc.actuate.mappings.DispatcherServletsMappingDescriptionProvider;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

56
spring-boot-project/spring-boot-actuator-integration-tests/build.gradle

@ -0,0 +1,56 @@ @@ -0,0 +1,56 @@
/*
* Copyright 2012-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id "java-library"
id "java-test-fixtures"
}
description = "Spring Boot Actuator Integration Tests"
dependencies {
testFixturesImplementation(project(":spring-boot-project:spring-boot-actuator"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-autoconfigure"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-http-converter"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-jackson"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-jersey"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-reactor-netty"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-test"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-tomcat"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-webflux"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-webmvc"))
testFixturesImplementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
testImplementation(project(":spring-boot-project:spring-boot-actuator"))
testImplementation(project(":spring-boot-project:spring-boot-autoconfigure"))
testImplementation(project(":spring-boot-project:spring-boot-http-converter"))
testImplementation(project(":spring-boot-project:spring-boot-jackson"))
testImplementation(project(":spring-boot-project:spring-boot-jersey"))
testImplementation(project(":spring-boot-project:spring-boot-reactor-netty"))
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tomcat"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation(project(":spring-boot-project:spring-boot-web-server"))
testImplementation(project(":spring-boot-project:spring-boot-webflux"))
testImplementation(project(":spring-boot-project:spring-boot-webmvc"))
testImplementation("io.micrometer:micrometer-registry-prometheus")
testImplementation("io.prometheus:prometheus-metrics-exposition-formats")
testImplementation("net.minidev:json-smart")
testImplementation("org.springframework.security:spring-security-web")
testRuntimeOnly("ch.qos.logback:logback-classic")
}

4
spring-boot-project/spring-boot-actuator-integration-tests/src/main/resources/META-INF/additional-spring-configuration-metadata.json

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
{
"groups": [],
"properties": []
}

0
spring-boot-project/spring-boot-actuator-integration-tests/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/AuditEventsEndpointWebIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/audit/AuditEventsEndpointWebIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpointWebIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpointWebIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/AbstractWebEndpointIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/AbstractWebEndpointIntegrationTests.java

80
spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/BaseConfiguration.java

@ -0,0 +1,80 @@ @@ -0,0 +1,80 @@
/*
* Copyright 2012-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.endpoint.web.annotation;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.actuate.endpoint.invoke.ParameterValueMapper;
import org.springframework.boot.actuate.endpoint.invoke.convert.ConversionServiceParameterValueMapper;
import org.springframework.boot.actuate.endpoint.web.EndpointMediaTypes;
import org.springframework.boot.actuate.endpoint.web.PathMapper;
import org.springframework.boot.tomcat.TomcatEmbeddedWebappClassLoader;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.convert.support.DefaultConversionService;
import static org.mockito.Mockito.mock;
/**
* Base configuration shared by tests.
*
* @author Andy Wilkinson
*/
@Configuration(proxyBeanMethods = false)
class BaseConfiguration {
@Bean
AbstractWebEndpointIntegrationTests.EndpointDelegate endpointDelegate() {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
if (classLoader instanceof TomcatEmbeddedWebappClassLoader) {
Thread.currentThread().setContextClassLoader(classLoader.getParent());
}
try {
return mock(AbstractWebEndpointIntegrationTests.EndpointDelegate.class);
}
finally {
Thread.currentThread().setContextClassLoader(classLoader);
}
}
@Bean
EndpointMediaTypes endpointMediaTypes() {
List<String> mediaTypes = Arrays.asList("application/vnd.test+json", "application/json");
return new EndpointMediaTypes(mediaTypes, mediaTypes);
}
@Bean
WebEndpointDiscoverer webEndpointDiscoverer(EndpointMediaTypes endpointMediaTypes,
ApplicationContext applicationContext, ObjectProvider<PathMapper> pathMappers) {
ParameterValueMapper parameterMapper = new ConversionServiceParameterValueMapper(
DefaultConversionService.getSharedInstance());
return new WebEndpointDiscoverer(applicationContext, parameterMapper, endpointMediaTypes,
pathMappers.orderedStream().toList(), Collections.emptyList(), Collections.emptyList(),
Collections.emptyList(), Collections.emptyList());
}
@Bean
static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
return new PropertySourcesPlaceholderConfigurer();
}
}

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/jersey/JerseyWebEndpointIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/jersey/JerseyWebEndpointIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/ControllerEndpointHandlerMappingIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/ControllerEndpointHandlerMappingIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/ControllerEndpointHandlerMappingIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/ControllerEndpointHandlerMappingIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/MvcWebEndpointIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/MvcWebEndpointIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointWebIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointWebIntegrationTests.java vendored

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthEndpointWebIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/health/HealthEndpointWebIntegrationTests.java

92
spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/health/TestHealthEndpointGroup.java

@ -0,0 +1,92 @@ @@ -0,0 +1,92 @@
/*
* Copyright 2012-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.health;
import java.util.function.Predicate;
import org.springframework.boot.actuate.endpoint.SecurityContext;
/**
* Test implementation of {@link HealthEndpointGroups}.
*
* @author Phillip Webb
*/
class TestHealthEndpointGroup implements HealthEndpointGroup {
private final StatusAggregator statusAggregator = new SimpleStatusAggregator();
private final HttpCodeStatusMapper httpCodeStatusMapper = new SimpleHttpCodeStatusMapper();
private final Predicate<String> memberPredicate;
private Boolean showComponents;
private boolean showDetails = true;
private AdditionalHealthEndpointPath additionalPath;
TestHealthEndpointGroup() {
this((name) -> true);
}
TestHealthEndpointGroup(Predicate<String> memberPredicate) {
this.memberPredicate = memberPredicate;
}
@Override
public boolean isMember(String name) {
return this.memberPredicate.test(name);
}
@Override
public boolean showComponents(SecurityContext securityContext) {
return (this.showComponents != null) ? this.showComponents : this.showDetails;
}
void setShowComponents(Boolean showComponents) {
this.showComponents = showComponents;
}
@Override
public boolean showDetails(SecurityContext securityContext) {
return this.showDetails;
}
void setShowDetails(boolean includeDetails) {
this.showDetails = includeDetails;
}
@Override
public StatusAggregator getStatusAggregator() {
return this.statusAggregator;
}
@Override
public HttpCodeStatusMapper getHttpCodeStatusMapper() {
return this.httpCodeStatusMapper;
}
@Override
public AdditionalHealthEndpointPath getAdditionalPath() {
return this.additionalPath;
}
void setAdditionalPath(AdditionalHealthEndpointPath additionalPath) {
this.additionalPath = additionalPath;
}
}

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/info/InfoEndpointWebIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/info/InfoEndpointWebIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointWebIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointWebIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/HeapDumpWebEndpointWebIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/management/HeapDumpWebEndpointWebIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/ThreadDumpEndpointWebIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/management/ThreadDumpEndpointWebIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusScrapeEndpointIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusScrapeEndpointIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/sbom/SbomEndpointCycloneDxWebIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/sbom/SbomEndpointCycloneDxWebIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/sbom/SbomEndpointSpdxWebIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/sbom/SbomEndpointSpdxWebIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/sbom/SbomEndpointSyftWebIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/sbom/SbomEndpointSyftWebIntegrationTests.java

0
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/sbom/SbomEndpointWebIntegrationTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/sbom/SbomEndpointWebIntegrationTests.java

12
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/mappings/MappingsEndpointTests.java → spring-boot-project/spring-boot-actuator-integration-tests/src/test/java/org/springframework/boot/actuate/web/mappings/MappingsEndpointIntegrationTests.java

@ -30,10 +30,6 @@ import org.junit.jupiter.api.Test; @@ -30,10 +30,6 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.web.mappings.MappingsEndpoint.ApplicationMappingsDescriptor;
import org.springframework.boot.actuate.web.mappings.MappingsEndpoint.ContextMappingsDescriptor;
import org.springframework.boot.actuate.web.mappings.reactive.DispatcherHandlerMappingDescription;
import org.springframework.boot.actuate.web.mappings.reactive.DispatcherHandlersMappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.servlet.DispatcherServletMappingDescription;
import org.springframework.boot.actuate.web.mappings.servlet.DispatcherServletsMappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.servlet.FilterRegistrationMappingDescription;
import org.springframework.boot.actuate.web.mappings.servlet.FiltersMappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.servlet.ServletRegistrationMappingDescription;
@ -42,6 +38,10 @@ import org.springframework.boot.test.context.runner.ReactiveWebApplicationContex @@ -42,6 +38,10 @@ import org.springframework.boot.test.context.runner.ReactiveWebApplicationContex
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.web.context.servlet.AnnotationConfigServletWebApplicationContext;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.boot.webflux.actuate.mappings.DispatcherHandlerMappingDescription;
import org.springframework.boot.webflux.actuate.mappings.DispatcherHandlersMappingDescriptionProvider;
import org.springframework.boot.webmvc.actuate.mappings.DispatcherServletMappingDescription;
import org.springframework.boot.webmvc.actuate.mappings.DispatcherServletsMappingDescriptionProvider;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -69,13 +69,13 @@ import static org.springframework.web.reactive.function.server.RequestPredicates @@ -69,13 +69,13 @@ import static org.springframework.web.reactive.function.server.RequestPredicates
import static org.springframework.web.reactive.function.server.RouterFunctions.route;
/**
* Tests for {@link MappingsEndpoint}.
* Integration tests for {@link MappingsEndpoint}.
*
* @author Andy Wilkinson
* @author Stephane Nicoll
* @author Xiong Tang
*/
class MappingsEndpointTests {
class MappingsEndpointIntegrationTests {
@Test
void servletWebMappings() {

4615
spring-boot-project/spring-boot-actuator-integration-tests/src/test/resources/org/springframework/boot/actuate/sbom/cyclonedx.json

File diff suppressed because it is too large Load Diff

3909
spring-boot-project/spring-boot-actuator-integration-tests/src/test/resources/org/springframework/boot/actuate/sbom/spdx.json

File diff suppressed because it is too large Load Diff

7525
spring-boot-project/spring-boot-actuator-integration-tests/src/test/resources/org/springframework/boot/actuate/sbom/syft.json

File diff suppressed because one or more lines are too long

0
spring-boot-project/spring-boot-actuator/src/testFixtures/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTest.java → spring-boot-project/spring-boot-actuator-integration-tests/src/testFixtures/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTest.java

0
spring-boot-project/spring-boot-actuator/src/testFixtures/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTestInvocationContextProvider.java → spring-boot-project/spring-boot-actuator-integration-tests/src/testFixtures/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTestInvocationContextProvider.java

20
spring-boot-project/spring-boot-actuator/build.gradle

@ -16,7 +16,6 @@ @@ -16,7 +16,6 @@
plugins {
id "java-library"
id "java-test-fixtures"
id "org.springframework.boot.configuration-properties"
id "org.springframework.boot.optional-dependencies"
id "org.springframework.boot.deployed"
@ -29,12 +28,8 @@ dependencies { @@ -29,12 +28,8 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-http-converter"))
optional(project(":spring-boot-project:spring-boot-jsonb"))
optional(project(":spring-boot-project:spring-boot-reactor-netty"))
optional(project(":spring-boot-project:spring-boot-tomcat"))
optional(project(":spring-boot-project:spring-boot-undertow"))
optional(project(":spring-boot-project:spring-boot-validation"))
optional(project(":spring-boot-project:spring-boot-webflux"))
optional(project(":spring-boot-project:spring-boot-webmvc"))
optional(project(":spring-boot-project:spring-boot-web-server"))
optional("com.fasterxml.jackson.core:jackson-databind")
optional("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
optional("com.github.ben-manes.caffeine:caffeine")
@ -68,22 +63,9 @@ dependencies { @@ -68,22 +63,9 @@ dependencies {
optional("org.springframework.security:spring-security-core")
optional("org.springframework.security:spring-security-web")
testFixturesImplementation(project(":spring-boot-project:spring-boot-autoconfigure"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-http-converter"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-jackson"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-jersey"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-reactor-netty"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-test"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-tomcat"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-webflux"))
testFixturesImplementation(project(":spring-boot-project:spring-boot-webmvc"))
testImplementation(project(":spring-boot-project:spring-boot-autoconfigure"))
testImplementation(project(":spring-boot-project:spring-boot-jackson"))
testImplementation(project(":spring-boot-project:spring-boot-jersey"))
testImplementation(project(":spring-boot-project:spring-boot-jsonb"))
testImplementation(project(":spring-boot-project:spring-boot-reactor-netty"))
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation("com.squareup.okhttp3:mockwebserver")

24
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/BaseConfiguration.java

@ -25,7 +25,6 @@ import org.springframework.boot.actuate.endpoint.invoke.ParameterValueMapper; @@ -25,7 +25,6 @@ import org.springframework.boot.actuate.endpoint.invoke.ParameterValueMapper;
import org.springframework.boot.actuate.endpoint.invoke.convert.ConversionServiceParameterValueMapper;
import org.springframework.boot.actuate.endpoint.web.EndpointMediaTypes;
import org.springframework.boot.actuate.endpoint.web.PathMapper;
import org.springframework.boot.tomcat.TomcatEmbeddedWebappClassLoader;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -43,17 +42,8 @@ import static org.mockito.Mockito.mock; @@ -43,17 +42,8 @@ import static org.mockito.Mockito.mock;
class BaseConfiguration {
@Bean
AbstractWebEndpointIntegrationTests.EndpointDelegate endpointDelegate() {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
if (classLoader instanceof TomcatEmbeddedWebappClassLoader) {
Thread.currentThread().setContextClassLoader(classLoader.getParent());
}
try {
return mock(AbstractWebEndpointIntegrationTests.EndpointDelegate.class);
}
finally {
Thread.currentThread().setContextClassLoader(classLoader);
}
EndpointDelegate endpointDelegate() {
return mock(EndpointDelegate.class);
}
@Bean
@ -77,4 +67,14 @@ class BaseConfiguration { @@ -77,4 +67,14 @@ class BaseConfiguration {
return new PropertySourcesPlaceholderConfigurer();
}
interface EndpointDelegate {
void write();
void write(String foo, String bar);
void delete();
}
}

2
spring-boot-project/spring-boot-cache/build.gradle vendored

@ -63,7 +63,7 @@ dependencies { @@ -63,7 +63,7 @@ dependencies {
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator")))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator-integration-tests")))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
testRuntimeOnly("ch.qos.logback:logback-classic")

2
spring-boot-project/spring-boot-integration/build.gradle

@ -44,7 +44,7 @@ dependencies { @@ -44,7 +44,7 @@ dependencies {
testImplementation(project(":spring-boot-project:spring-boot-rsocket"))
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator")))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator-integration-tests")))
testImplementation("org.springframework:spring-web")
testRuntimeOnly(project(":spring-boot-project:spring-boot-reactor-netty"))

2
spring-boot-project/spring-boot-metrics/build.gradle

@ -39,7 +39,7 @@ dependencies { @@ -39,7 +39,7 @@ dependencies {
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator")))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator-integration-tests")))
testImplementation("com.fasterxml.jackson.core:jackson-databind")
testImplementation("io.micrometer:micrometer-registry-atlas")
testImplementation("io.micrometer:micrometer-registry-new-relic")

2
spring-boot-project/spring-boot-quartz/build.gradle

@ -41,7 +41,7 @@ dependencies { @@ -41,7 +41,7 @@ dependencies {
testImplementation(project(":spring-boot-project:spring-boot-liquibase"))
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator")))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator-integration-tests")))
testImplementation("net.minidev:json-smart")
testImplementation("org.springframework:spring-web")

2
spring-boot-project/spring-boot-session/build.gradle

@ -49,7 +49,7 @@ dependencies { @@ -49,7 +49,7 @@ dependencies {
testImplementation(project(":spring-boot-project:spring-boot-tomcat"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation(project(":spring-boot-project:spring-boot-webflux"))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator")))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator-integration-tests")))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-web-server")))
testImplementation("net.minidev:json-smart")
testImplementation("io.projectreactor:reactor-test")

1
spring-boot-project/spring-boot-tomcat/build.gradle

@ -38,6 +38,7 @@ dependencies { @@ -38,6 +38,7 @@ dependencies {
}
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional("io.micrometer:micrometer-core")
optional("org.apache.tomcat.embed:tomcat-embed-jasper")
optional("org.apache.tomcat.embed:tomcat-embed-websocket") {
exclude group: "org.apache.tomcat", module: "tomcat-annotations-api"

4
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/tomcat/TomcatMetricsBinder.java → spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/actuate/metrics/TomcatMetricsBinder.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.metrics.web.tomcat;
package org.springframework.boot.tomcat.actuate.metrics;
import java.util.Collections;
@ -37,7 +37,7 @@ import org.springframework.context.ApplicationListener; @@ -37,7 +37,7 @@ import org.springframework.context.ApplicationListener;
* Binds {@link TomcatMetrics} in response to the {@link ApplicationStartedEvent}.
*
* @author Andy Wilkinson
* @since 2.1.0
* @since 4.0.0
*/
public class TomcatMetricsBinder implements ApplicationListener<ApplicationStartedEvent>, DisposableBean {

4
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/tomcat/package-info.java → spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/actuate/metrics/package-info.java

@ -15,6 +15,6 @@ @@ -15,6 +15,6 @@
*/
/**
* Actuator support for Tomcat metrics.
* Tomcat metrics.
*/
package org.springframework.boot.actuate.metrics.web.tomcat;
package org.springframework.boot.tomcat.actuate.metrics;

2
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/tomcat/TomcatMetricsBinderTests.java → spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/actuate/metrics/web/tomcat/TomcatMetricsBinderTests.java

@ -19,6 +19,8 @@ package org.springframework.boot.actuate.metrics.web.tomcat; @@ -19,6 +19,8 @@ package org.springframework.boot.actuate.metrics.web.tomcat;
import io.micrometer.core.instrument.MeterRegistry;
import org.junit.jupiter.api.Test;
import org.springframework.boot.tomcat.actuate.metrics.TomcatMetricsBinder;
import static org.mockito.Mockito.mock;
/**

1
spring-boot-project/spring-boot-webflux/build.gradle

@ -32,6 +32,7 @@ dependencies { @@ -32,6 +32,7 @@ dependencies {
implementation(project(":spring-boot-project:spring-boot-http-codec"))
implementation(project(":spring-boot-project:spring-boot-web-server"))
optional(project(":spring-boot-project:spring-boot-actuator"))
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-validation"))

8
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/reactive/DispatcherHandlerMappingDescription.java → spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/mappings/DispatcherHandlerMappingDescription.java

@ -14,15 +14,15 @@ @@ -14,15 +14,15 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.web.mappings.reactive;
package org.springframework.boot.webflux.actuate.mappings;
import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.reactive.DispatcherHandler;
/**
* A description of a mapping known to a {@link DispatcherServlet}.
* A description of a mapping known to a {@link DispatcherHandler}.
*
* @author Andy Wilkinson
* @since 2.0.0
* @since 4.0.0
*/
public class DispatcherHandlerMappingDescription {

4
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/reactive/DispatcherHandlerMappingDetails.java → spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/mappings/DispatcherHandlerMappingDetails.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.web.mappings.reactive;
package org.springframework.boot.webflux.actuate.mappings;
import org.springframework.boot.actuate.web.mappings.HandlerMethodDescription;
import org.springframework.web.reactive.DispatcherHandler;
@ -23,7 +23,7 @@ import org.springframework.web.reactive.DispatcherHandler; @@ -23,7 +23,7 @@ import org.springframework.web.reactive.DispatcherHandler;
* Details of a {@link DispatcherHandler} mapping.
*
* @author Andy Wilkinson
* @since 2.0.0
* @since 4.0.0
*/
public class DispatcherHandlerMappingDetails {

6
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/reactive/DispatcherHandlersMappingDescriptionProvider.java → spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/mappings/DispatcherHandlersMappingDescriptionProvider.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.web.mappings.reactive;
package org.springframework.boot.webflux.actuate.mappings;
import java.util.ArrayList;
import java.util.Arrays;
@ -32,7 +32,7 @@ import org.springframework.aot.hint.RuntimeHints; @@ -32,7 +32,7 @@ import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.boot.actuate.web.mappings.HandlerMethodDescription;
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.reactive.DispatcherHandlersMappingDescriptionProvider.DispatcherHandlersMappingDescriptionProviderRuntimeHints;
import org.springframework.boot.webflux.actuate.mappings.DispatcherHandlersMappingDescriptionProvider.DispatcherHandlersMappingDescriptionProviderRuntimeHints;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ImportRuntimeHints;
import org.springframework.core.io.Resource;
@ -55,7 +55,7 @@ import org.springframework.web.util.pattern.PathPattern; @@ -55,7 +55,7 @@ import org.springframework.web.util.pattern.PathPattern;
* HandlerMappings} that are known to a {@link DispatcherHandler}.
*
* @author Andy Wilkinson
* @since 2.0.0
* @since 4.0.0
*/
@ImportRuntimeHints(DispatcherHandlersMappingDescriptionProviderRuntimeHints.class)
public class DispatcherHandlersMappingDescriptionProvider implements MappingDescriptionProvider {

4
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/reactive/HandlerFunctionDescription.java → spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/mappings/HandlerFunctionDescription.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.web.mappings.reactive;
package org.springframework.boot.webflux.actuate.mappings;
import org.springframework.web.reactive.function.server.HandlerFunction;
@ -22,7 +22,7 @@ import org.springframework.web.reactive.function.server.HandlerFunction; @@ -22,7 +22,7 @@ import org.springframework.web.reactive.function.server.HandlerFunction;
* Description of a {@link HandlerFunction}.
*
* @author Andy Wilkinson
* @since 2.0.0
* @since 4.0.0
*/
public class HandlerFunctionDescription {

4
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/reactive/RequestMappingConditionsDescription.java → spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/mappings/RequestMappingConditionsDescription.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.web.mappings.reactive;
package org.springframework.boot.webflux.actuate.mappings;
import java.util.Collections;
import java.util.List;
@ -31,7 +31,7 @@ import org.springframework.web.util.pattern.PathPattern; @@ -31,7 +31,7 @@ import org.springframework.web.util.pattern.PathPattern;
* Description of the conditions of a {@link RequestMappingInfo}.
*
* @author Andy Wilkinson
* @since 2.0.0
* @since 4.0.0
*/
public class RequestMappingConditionsDescription {

2
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/reactive/package-info.java → spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/mappings/package-info.java

@ -17,4 +17,4 @@ @@ -17,4 +17,4 @@
/**
* Actuator reactive request mappings support.
*/
package org.springframework.boot.actuate.web.mappings.reactive;
package org.springframework.boot.webflux.actuate.mappings;

4
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/mappings/reactive/DispatcherHandlersMappingDescriptionProviderTests.java → spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/mappings/DispatcherHandlersMappingDescriptionProviderTests.java

@ -14,14 +14,14 @@ @@ -14,14 +14,14 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.web.mappings.reactive;
package org.springframework.boot.webflux.actuate.mappings;
import org.junit.jupiter.api.Test;
import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.predicate.RuntimeHintsPredicates;
import org.springframework.boot.actuate.web.mappings.reactive.DispatcherHandlersMappingDescriptionProvider.DispatcherHandlersMappingDescriptionProviderRuntimeHints;
import org.springframework.boot.webflux.actuate.mappings.DispatcherHandlersMappingDescriptionProvider.DispatcherHandlersMappingDescriptionProviderRuntimeHints;
import static org.assertj.core.api.Assertions.assertThat;

3
spring-boot-project/spring-boot-webmvc/build.gradle

@ -34,7 +34,10 @@ dependencies { @@ -34,7 +34,10 @@ dependencies {
implementation(project(":spring-boot-project:spring-boot-http-converter"))
optional(project(":spring-boot-project:spring-boot-actuator"))
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-tomcat"))
optional(project(":spring-boot-project:spring-boot-undertow"))
optional(project(":spring-boot-project:spring-boot-validation"))
optional(project(":spring-boot-project:spring-boot-web-server"))

2
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/DispatcherServletHandlerMappings.java → spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/DispatcherServletHandlerMappings.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.web.mappings.servlet;
package org.springframework.boot.webmvc.actuate.mappings;
import java.util.Collections;
import java.util.List;

4
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/DispatcherServletMappingDescription.java → spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/DispatcherServletMappingDescription.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.web.mappings.servlet;
package org.springframework.boot.webmvc.actuate.mappings;
import org.springframework.web.servlet.DispatcherServlet;
@ -22,7 +22,7 @@ import org.springframework.web.servlet.DispatcherServlet; @@ -22,7 +22,7 @@ import org.springframework.web.servlet.DispatcherServlet;
* A description of a mapping known to a {@link DispatcherServlet}.
*
* @author Andy Wilkinson
* @since 2.0.0
* @since 4.0.0
*/
public class DispatcherServletMappingDescription {

4
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/DispatcherServletMappingDetails.java → spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/DispatcherServletMappingDetails.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.web.mappings.servlet;
package org.springframework.boot.webmvc.actuate.mappings;
import org.springframework.boot.actuate.web.mappings.HandlerMethodDescription;
import org.springframework.web.servlet.DispatcherServlet;
@ -24,7 +24,7 @@ import org.springframework.web.servlet.DispatcherServlet; @@ -24,7 +24,7 @@ import org.springframework.web.servlet.DispatcherServlet;
*
* @author Andy Wilkinson
* @author Xiong Tang
* @since 2.0.0
* @since 4.0.0
*/
public class DispatcherServletMappingDetails {

6
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/DispatcherServletsMappingDescriptionProvider.java → spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/DispatcherServletsMappingDescriptionProvider.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.web.mappings.servlet;
package org.springframework.boot.webmvc.actuate.mappings;
import java.util.ArrayList;
import java.util.Collections;
@ -34,8 +34,8 @@ import org.springframework.aot.hint.RuntimeHints; @@ -34,8 +34,8 @@ import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.boot.actuate.web.mappings.HandlerMethodDescription;
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.servlet.DispatcherServletsMappingDescriptionProvider.DispatcherServletsMappingDescriptionProviderRuntimeHints;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.boot.webmvc.actuate.mappings.DispatcherServletsMappingDescriptionProvider.DispatcherServletsMappingDescriptionProviderRuntimeHints;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ImportRuntimeHints;
import org.springframework.core.io.Resource;
@ -61,7 +61,7 @@ import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMappi @@ -61,7 +61,7 @@ import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMappi
* @author Andy Wilkinson
* @author Stephane Nicoll
* @author Xiong Tang
* @since 2.0.0
* @since 4.0.0
*/
@ImportRuntimeHints(DispatcherServletsMappingDescriptionProviderRuntimeHints.class)
public class DispatcherServletsMappingDescriptionProvider implements MappingDescriptionProvider {

4
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/HandlerFunctionDescription.java → spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/HandlerFunctionDescription.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.web.mappings.servlet;
package org.springframework.boot.webmvc.actuate.mappings;
import org.springframework.web.servlet.function.HandlerFunction;
@ -22,7 +22,7 @@ import org.springframework.web.servlet.function.HandlerFunction; @@ -22,7 +22,7 @@ import org.springframework.web.servlet.function.HandlerFunction;
* Description of a {@link HandlerFunction}.
*
* @author Xiong Tang
* @since 3.5.0
* @since 4.0.0
*/
public class HandlerFunctionDescription {

4
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/RequestMappingConditionsDescription.java → spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/RequestMappingConditionsDescription.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.web.mappings.servlet;
package org.springframework.boot.webmvc.actuate.mappings;
import java.util.List;
import java.util.Set;
@ -28,7 +28,7 @@ import org.springframework.web.servlet.mvc.method.RequestMappingInfo; @@ -28,7 +28,7 @@ import org.springframework.web.servlet.mvc.method.RequestMappingInfo;
* Description of the conditions of a {@link RequestMappingInfo}.
*
* @author Andy Wilkinson
* @since 2.0.0
* @since 4.0.0
*/
public class RequestMappingConditionsDescription {

20
spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/mappings/package-info.java

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
/*
* Copyright 2012-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Actuator request mappings support for Spring MVC.
*/
package org.springframework.boot.webmvc.actuate.mappings;

4
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/mappings/servlet/DispatcherServletsMappingDescriptionProviderTests.java → spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/mappings/DispatcherServletsMappingDescriptionProviderTests.java

@ -14,14 +14,14 @@ @@ -14,14 +14,14 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.web.mappings.servlet;
package org.springframework.boot.webmvc.actuate.mappings;
import org.junit.jupiter.api.Test;
import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.predicate.RuntimeHintsPredicates;
import org.springframework.boot.actuate.web.mappings.servlet.DispatcherServletsMappingDescriptionProvider.DispatcherServletsMappingDescriptionProviderRuntimeHints;
import org.springframework.boot.webmvc.actuate.mappings.DispatcherServletsMappingDescriptionProvider.DispatcherServletsMappingDescriptionProviderRuntimeHints;
import static org.assertj.core.api.Assertions.assertThat;
Loading…
Cancel
Save