Merge branch '1.5.x'
This commit is contained in:
@@ -42,6 +42,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
||||
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
|
||||
@@ -85,15 +86,16 @@ public class EndpointMvcIntegrationTests {
|
||||
@Test
|
||||
public void envEndpointNotHidden() throws InterruptedException {
|
||||
String body = new TestRestTemplate().getForObject(
|
||||
"http://localhost:" + this.port + "/application/env/foo.bar", String.class);
|
||||
"http://localhost:" + this.port + "/application/env/foo.bar",
|
||||
String.class);
|
||||
assertThat(body).isNotNull().contains("\"baz\"");
|
||||
assertThat(this.interceptor.invoked()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void healthEndpointNotHidden() throws InterruptedException {
|
||||
String body = new TestRestTemplate()
|
||||
.getForObject("http://localhost:" + this.port + "/application/health", String.class);
|
||||
String body = new TestRestTemplate().getForObject(
|
||||
"http://localhost:" + this.port + "/application/health", String.class);
|
||||
assertThat(body).isNotNull().contains("status");
|
||||
assertThat(this.interceptor.invoked()).isTrue();
|
||||
}
|
||||
@@ -153,9 +155,9 @@ public class EndpointMvcIntegrationTests {
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Import({ ServletWebServerFactoryAutoConfiguration.class,
|
||||
DispatcherServletAutoConfiguration.class, WebMvcAutoConfiguration.class,
|
||||
JacksonAutoConfiguration.class, ErrorMvcAutoConfiguration.class,
|
||||
PropertyPlaceholderAutoConfiguration.class })
|
||||
DispatcherServletAutoConfiguration.class, ValidationAutoConfiguration.class,
|
||||
WebMvcAutoConfiguration.class, JacksonAutoConfiguration.class,
|
||||
ErrorMvcAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class })
|
||||
protected @interface MinimalWebConfiguration {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user