Merge branch '1.4.x' into 1.5.x

This commit is contained in:
Phillip Webb 2016-11-15 13:58:54 -08:00
commit 764f13453a
2 changed files with 7 additions and 7 deletions

View File

@ -48,17 +48,16 @@ public class ManagementServerPropertiesAutoConfigurationNoSecurityTests {
@Test
public void securitySettingsIgnoredWithoutSpringSecurity() {
ManagementServerProperties properties =
load("management.security.enabled=false");
ManagementServerProperties properties = load("management.security.enabled=false");
assertThat(properties.getSecurity().isEnabled()).isFalse();
}
public ManagementServerProperties load(String... environment) {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
EnvironmentTestUtils.addEnvironment(ctx, environment);
ctx.register(ManagementServerPropertiesAutoConfiguration.class);
ctx.refresh();
this.context = ctx;
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
EnvironmentTestUtils.addEnvironment(context, environment);
context.register(ManagementServerPropertiesAutoConfiguration.class);
context.refresh();
this.context = context;
return this.context.getBean(ManagementServerProperties.class);
}

View File

@ -51,6 +51,7 @@ import org.springframework.web.servlet.DispatcherServlet;
public class MockMvcAutoConfiguration {
private final WebApplicationContext context;
private final WebMvcProperties webMvcProperties;
MockMvcAutoConfiguration(WebApplicationContext context,