This commit is contained in:
Phillip Webb
2014-01-10 12:55:25 -08:00
parent 26d900f3ad
commit 47da8a817a
26 changed files with 112 additions and 66 deletions

View File

@@ -128,7 +128,8 @@ public class ManagementSecurityAutoConfiguration {
IgnoredRequestConfigurer ignoring = builder.ignoring();
// The ignores are not cumulative, so to prevent overwriting the defaults we
// add them back.
List<String> ignored = SpringBootWebSecurityConfiguration.getIgnored(this.security);
List<String> ignored = SpringBootWebSecurityConfiguration
.getIgnored(this.security);
ignored.addAll(Arrays.asList(getEndpointPaths(this.endpointHandlerMapping,
false)));
if (!this.management.getSecurity().isEnabled()) {

View File

@@ -142,7 +142,8 @@ public class EndpointWebMvcAutoConfigurationTests {
@Test
public void contextPath() throws Exception {
EnvironmentTestUtils.addEnvironment(this.applicationContext, "management.contextPath:/test");
EnvironmentTestUtils.addEnvironment(this.applicationContext,
"management.contextPath:/test");
this.applicationContext.register(RootConfig.class,
PropertyPlaceholderAutoConfiguration.class,
ManagementServerPropertiesAutoConfiguration.class,

View File

@@ -59,7 +59,8 @@ public class EnvironmentMvcEndpointTests {
@Before
public void setUp() {
this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build();
EnvironmentTestUtils.addEnvironment((ConfigurableApplicationContext) this.context, "foo:bar");
EnvironmentTestUtils.addEnvironment(
(ConfigurableApplicationContext) this.context, "foo:bar");
}
@Test

View File

@@ -66,7 +66,8 @@ public class JolokiaEndpointTests {
@Before
public void setUp() {
this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build();
EnvironmentTestUtils.addEnvironment((ConfigurableApplicationContext) this.context, "foo:bar");
EnvironmentTestUtils.addEnvironment(
(ConfigurableApplicationContext) this.context, "foo:bar");
}
@Test