Merge branch '1.5.x'
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user