|
|
@ -35,6 +35,7 @@ import org.springframework.boot.actuate.autoconfigure.web.servlet.ServletManagem
|
|
|
|
import org.springframework.boot.actuate.endpoint.web.EndpointServlet;
|
|
|
|
import org.springframework.boot.actuate.endpoint.web.EndpointServlet;
|
|
|
|
import org.springframework.boot.actuate.endpoint.web.annotation.RestControllerEndpoint;
|
|
|
|
import org.springframework.boot.actuate.endpoint.web.annotation.RestControllerEndpoint;
|
|
|
|
import org.springframework.boot.actuate.endpoint.web.annotation.ServletEndpoint;
|
|
|
|
import org.springframework.boot.actuate.endpoint.web.annotation.ServletEndpoint;
|
|
|
|
|
|
|
|
import org.springframework.boot.actuate.trace.http.InMemoryHttpTraceRepository;
|
|
|
|
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
|
|
|
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
|
|
|
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
|
|
|
@ -45,6 +46,8 @@ import org.springframework.boot.test.context.assertj.AssertableWebApplicationCon
|
|
|
|
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
|
|
|
|
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
|
|
|
|
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
|
|
|
|
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
|
|
|
|
import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext;
|
|
|
|
import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext;
|
|
|
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
import org.springframework.http.HttpMethod;
|
|
|
|
import org.springframework.http.HttpMethod;
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
import org.springframework.test.web.reactive.server.EntityExchangeResult;
|
|
|
|
import org.springframework.test.web.reactive.server.EntityExchangeResult;
|
|
|
@ -79,7 +82,8 @@ public class WebMvcEndpointExposureIntegrationTests {
|
|
|
|
.withConfiguration(
|
|
|
|
.withConfiguration(
|
|
|
|
AutoConfigurations.of(EndpointAutoConfigurationClasses.ALL))
|
|
|
|
AutoConfigurations.of(EndpointAutoConfigurationClasses.ALL))
|
|
|
|
.withUserConfiguration(CustomMvcEndpoint.class,
|
|
|
|
.withUserConfiguration(CustomMvcEndpoint.class,
|
|
|
|
CustomServletEndpoint.class)
|
|
|
|
CustomServletEndpoint.class,
|
|
|
|
|
|
|
|
HttpTraceRepositoryConfiguration.class)
|
|
|
|
.withPropertyValues("server.port:0");
|
|
|
|
.withPropertyValues("server.port:0");
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -215,4 +219,14 @@ public class WebMvcEndpointExposureIntegrationTests {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Configuration(proxyBeanMethods = false)
|
|
|
|
|
|
|
|
public static class HttpTraceRepositoryConfiguration {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
|
|
|
public InMemoryHttpTraceRepository httpTraceRepository() {
|
|
|
|
|
|
|
|
return new InMemoryHttpTraceRepository();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|