32 changed files with 251 additions and 496 deletions
@ -1,66 +0,0 @@
@@ -1,66 +0,0 @@
|
||||
/* |
||||
* 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 "org.springframework.boot.deployed" |
||||
id "org.springframework.boot.optional-dependencies" |
||||
} |
||||
|
||||
description = "Spring Boot Actuator AutoConfigure All" |
||||
|
||||
configurations.all { |
||||
resolutionStrategy.eachDependency { |
||||
if (it.requested.group == 'org.opensaml') { |
||||
it.useVersion '4.0.1' |
||||
} |
||||
} |
||||
} |
||||
|
||||
dependencies { |
||||
api(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) |
||||
api(project(":spring-boot-project:spring-boot-autoconfigure")) |
||||
|
||||
optional(project(":spring-boot-project:spring-boot-jersey")) |
||||
optional(project(":spring-boot-project:spring-boot-security")) |
||||
optional(project(":spring-boot-project:spring-boot-security-oauth2-client")) |
||||
optional(project(":spring-boot-project:spring-boot-security-oauth2-resource-server")) |
||||
optional(project(":spring-boot-project:spring-boot-security-saml2")) |
||||
optional(project(":spring-boot-project:spring-boot-web-server")) |
||||
optional(project(":spring-boot-project:spring-boot-webmvc")) |
||||
optional("io.projectreactor:reactor-core") |
||||
optional("jakarta.servlet:jakarta.servlet-api") |
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-data-cassandra")) |
||||
testImplementation(project(":spring-boot-project:spring-boot-data-rest")) |
||||
testImplementation(project(":spring-boot-project:spring-boot-hateoas")) |
||||
testImplementation(project(":spring-boot-project:spring-boot-http-codec")) |
||||
testImplementation(project(":spring-boot-project:spring-boot-http-converter")) |
||||
testImplementation(project(":spring-boot-project:spring-boot-jackson")) |
||||
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-webflux")) |
||||
testImplementation("org.springframework.security:spring-security-test") |
||||
|
||||
testRuntimeOnly("ch.qos.logback:logback-classic") |
||||
} |
||||
|
||||
tasks.named("test") { |
||||
jvmArgs += "--add-opens=java.base/java.net=ALL-UNNAMED" |
||||
} |
||||
@ -1,61 +0,0 @@
@@ -1,61 +0,0 @@
|
||||
/* |
||||
* 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.autoconfigure.integrationtest; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.audit.AuditEventsEndpointAutoConfiguration; |
||||
import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration; |
||||
import org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpointAutoConfiguration; |
||||
import org.springframework.boot.actuate.autoconfigure.context.ShutdownEndpointAutoConfiguration; |
||||
import org.springframework.boot.actuate.autoconfigure.context.properties.ConfigurationPropertiesReportEndpointAutoConfiguration; |
||||
import org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointAutoConfiguration; |
||||
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration; |
||||
import org.springframework.boot.actuate.autoconfigure.info.InfoEndpointAutoConfiguration; |
||||
import org.springframework.boot.actuate.autoconfigure.management.ThreadDumpEndpointAutoConfiguration; |
||||
import org.springframework.boot.actuate.autoconfigure.web.exchanges.HttpExchangesEndpointAutoConfiguration; |
||||
import org.springframework.boot.actuate.autoconfigure.web.mappings.MappingsEndpointAutoConfiguration; |
||||
import org.springframework.util.ClassUtils; |
||||
|
||||
/** |
||||
* A list of all endpoint auto-configuration classes for use in tests. |
||||
*/ |
||||
final class EndpointAutoConfigurationClasses { |
||||
|
||||
static final Class<?>[] ALL; |
||||
|
||||
static { |
||||
List<Class<?>> all = new ArrayList<>(); |
||||
all.add(AuditEventsEndpointAutoConfiguration.class); |
||||
all.add(BeansEndpointAutoConfiguration.class); |
||||
all.add(ConditionsReportEndpointAutoConfiguration.class); |
||||
all.add(ConfigurationPropertiesReportEndpointAutoConfiguration.class); |
||||
all.add(ShutdownEndpointAutoConfiguration.class); |
||||
all.add(EnvironmentEndpointAutoConfiguration.class); |
||||
all.add(HealthEndpointAutoConfiguration.class); |
||||
all.add(InfoEndpointAutoConfiguration.class); |
||||
all.add(ThreadDumpEndpointAutoConfiguration.class); |
||||
all.add(HttpExchangesEndpointAutoConfiguration.class); |
||||
all.add(MappingsEndpointAutoConfiguration.class); |
||||
ALL = ClassUtils.toClassArray(all); |
||||
} |
||||
|
||||
private EndpointAutoConfigurationClasses() { |
||||
} |
||||
|
||||
} |
||||
@ -1,80 +0,0 @@
@@ -1,80 +0,0 @@
|
||||
/* |
||||
* 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.autoconfigure.integrationtest; |
||||
|
||||
import java.io.IOException; |
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator; |
||||
import com.fasterxml.jackson.databind.ObjectMapper; |
||||
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
import com.fasterxml.jackson.databind.module.SimpleModule; |
||||
import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer; |
||||
|
||||
import org.springframework.boot.actuate.endpoint.jackson.EndpointObjectMapper; |
||||
import org.springframework.context.annotation.Bean; |
||||
import org.springframework.context.annotation.Configuration; |
||||
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; |
||||
|
||||
/** |
||||
* {@link Configuration @Configuration} that creates an {@link EndpointObjectMapper} that |
||||
* reverses all strings. |
||||
* |
||||
* @author Phillip Webb |
||||
*/ |
||||
@Configuration |
||||
@SuppressWarnings("removal") |
||||
class EndpointObjectMapperConfiguration { |
||||
|
||||
@Bean |
||||
EndpointObjectMapper endpointObjectMapper() { |
||||
SimpleModule module = new SimpleModule(); |
||||
module.addSerializer(String.class, new ReverseStringSerializer()); |
||||
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json().modules(module).build(); |
||||
return () -> objectMapper; |
||||
} |
||||
|
||||
static class ReverseStringSerializer extends StdScalarSerializer<Object> { |
||||
|
||||
ReverseStringSerializer() { |
||||
super(String.class, false); |
||||
} |
||||
|
||||
@Override |
||||
public boolean isEmpty(SerializerProvider prov, Object value) { |
||||
return ((String) value).isEmpty(); |
||||
} |
||||
|
||||
@Override |
||||
public void serialize(Object value, JsonGenerator gen, SerializerProvider provider) throws IOException { |
||||
serialize(value, gen); |
||||
} |
||||
|
||||
@Override |
||||
public final void serializeWithType(Object value, JsonGenerator gen, SerializerProvider provider, |
||||
TypeSerializer typeSer) throws IOException { |
||||
serialize(value, gen); |
||||
} |
||||
|
||||
private void serialize(Object value, JsonGenerator gen) throws IOException { |
||||
StringBuilder builder = new StringBuilder((String) value); |
||||
gen.writeString(builder.reverse().toString()); |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
||||
6
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JmxEndpointAccessIntegrationTests.java → spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/jmx/JmxEndpointAccessIntegrationTests.java
6
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JmxEndpointAccessIntegrationTests.java → spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/jmx/JmxEndpointAccessIntegrationTests.java
21
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JmxEndpointIntegrationTests.java → spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/jmx/JmxEndpointIntegrationTests.java
21
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JmxEndpointIntegrationTests.java → spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/jmx/JmxEndpointIntegrationTests.java
10
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java → spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointsAutoConfigurationIntegrationTests.java
10
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java → spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointsAutoConfigurationIntegrationTests.java
4
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/AbstractHealthEndpointAdditionalPathIntegrationTests.java → spring-boot-project/spring-boot-actuator-autoconfigure/src/testFixtures/java/org/springframework/boot/actuate/autoconfigure/integrationtest/AbstractHealthEndpointAdditionalPathIntegrationTests.java
4
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/AbstractHealthEndpointAdditionalPathIntegrationTests.java → spring-boot-project/spring-boot-actuator-autoconfigure/src/testFixtures/java/org/springframework/boot/actuate/autoconfigure/integrationtest/AbstractHealthEndpointAdditionalPathIntegrationTests.java
5
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JerseyEndpointAccessIntegrationTests.java → spring-boot-project/spring-boot-jersey/src/test/java/org/springframework/boot/jersey/actuate/autoconfigure/JerseyEndpointAccessIntegrationTests.java
5
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JerseyEndpointAccessIntegrationTests.java → spring-boot-project/spring-boot-jersey/src/test/java/org/springframework/boot/jersey/actuate/autoconfigure/JerseyEndpointAccessIntegrationTests.java
78
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JerseyEndpointIntegrationTests.java → spring-boot-project/spring-boot-jersey/src/test/java/org/springframework/boot/jersey/actuate/autoconfigure/JerseyEndpointIntegrationTests.java
78
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JerseyEndpointIntegrationTests.java → spring-boot-project/spring-boot-jersey/src/test/java/org/springframework/boot/jersey/actuate/autoconfigure/JerseyEndpointIntegrationTests.java
6
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JerseyHealthEndpointAdditionalPathIntegrationTests.java → spring-boot-project/spring-boot-jersey/src/test/java/org/springframework/boot/jersey/actuate/autoconfigure/JerseyHealthEndpointAdditionalPathIntegrationTests.java
6
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JerseyHealthEndpointAdditionalPathIntegrationTests.java → spring-boot-project/spring-boot-jersey/src/test/java/org/springframework/boot/jersey/actuate/autoconfigure/JerseyHealthEndpointAdditionalPathIntegrationTests.java
12
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebFluxIntegrationTests.java → spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/autoconfigure/web/ControllerEndpointWebFluxIntegrationTests.java
12
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebFluxIntegrationTests.java → spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/autoconfigure/web/ControllerEndpointWebFluxIntegrationTests.java
5
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointAccessIntegrationTests.java → spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/autoconfigure/web/WebFluxEndpointAccessIntegrationTests.java
5
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointAccessIntegrationTests.java → spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/autoconfigure/web/WebFluxEndpointAccessIntegrationTests.java
2
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointCorsIntegrationTests.java → spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/autoconfigure/web/WebFluxEndpointCorsIntegrationTests.java
2
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointCorsIntegrationTests.java → spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/autoconfigure/web/WebFluxEndpointCorsIntegrationTests.java
55
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointIntegrationTests.java → spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/autoconfigure/web/WebFluxEndpointIntegrationTests.java
55
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointIntegrationTests.java → spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/autoconfigure/web/WebFluxEndpointIntegrationTests.java
3
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxHealthEndpointAdditionalPathIntegrationTests.java → spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/autoconfigure/web/WebFluxHealthEndpointAdditionalPathIntegrationTests.java
3
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxHealthEndpointAdditionalPathIntegrationTests.java → spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/autoconfigure/web/WebFluxHealthEndpointAdditionalPathIntegrationTests.java
45
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebMvcIntegrationTests.java → spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/autoconfigure/endpoint/web/ControllerEndpointWebMvcIntegrationTests.java
45
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/ControllerEndpointWebMvcIntegrationTests.java → spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/autoconfigure/endpoint/web/ControllerEndpointWebMvcIntegrationTests.java
46
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointAccessIntegrationTests.java → spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/autoconfigure/endpoint/web/WebMvcEndpointAccessIntegrationTests.java
46
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointAccessIntegrationTests.java → spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/autoconfigure/endpoint/web/WebMvcEndpointAccessIntegrationTests.java
3
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointCorsIntegrationTests.java → spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/autoconfigure/endpoint/web/WebMvcEndpointCorsIntegrationTests.java
3
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointCorsIntegrationTests.java → spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/autoconfigure/endpoint/web/WebMvcEndpointCorsIntegrationTests.java
87
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointExposureIntegrationTests.java → spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/autoconfigure/endpoint/web/WebMvcEndpointExposureIntegrationTests.java
87
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointExposureIntegrationTests.java → spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/autoconfigure/endpoint/web/WebMvcEndpointExposureIntegrationTests.java
134
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointIntegrationTests.java → spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/autoconfigure/endpoint/web/WebMvcEndpointIntegrationTests.java
134
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointIntegrationTests.java → spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/autoconfigure/endpoint/web/WebMvcEndpointIntegrationTests.java
3
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcHealthEndpointAdditionalPathIntegrationTests.java → spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/autoconfigure/endpoint/web/WebMvcHealthEndpointAdditionalPathIntegrationTests.java
3
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcHealthEndpointAdditionalPathIntegrationTests.java → spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/autoconfigure/endpoint/web/WebMvcHealthEndpointAdditionalPathIntegrationTests.java
Loading…
Reference in new issue