Merge branch '1.5.x'

pull/9426/head
Andy Wilkinson 8 years ago
commit a72c1b2cba

@ -150,7 +150,7 @@ public class EndpointWebMvcAutoConfiguration
}
}
if (managementPort == ManagementServerPort.SAME) {
if (environment.getProperty("management.ssl.enabled") != null) {
if (environment.getProperty("management.ssl.enabled", Boolean.class, false)) {
throw new IllegalStateException(
"Management-specific SSL cannot be configured as the management "
+ "server is not listening on a separate port");

@ -561,6 +561,17 @@ public class EndpointWebMvcAutoConfigurationTests {
this.applicationContext.refresh();
}
@Test
public void samePortCanBeUsedWhenManagementSslIsExplicitlyDisabled()
throws Exception {
TestPropertyValues.of("management.ssl.enabled=false")
.applyTo(this.applicationContext);
this.applicationContext.register(RootConfig.class, EndpointConfig.class,
BaseConfiguration.class, EndpointWebMvcAutoConfiguration.class,
ErrorMvcAutoConfiguration.class);
this.applicationContext.refresh();
}
@Test
public void managementServerCanDisableSslWhenUsingADifferentPort() throws Exception {
TestPropertyValues.of("management.port=" + ports.get().management,

Loading…
Cancel
Save