Drop superfluous disabled check

Remove EndpointWebMvcManagementContextConfiguration `disabled` logic
since the configuration should even be processed when the management
port is `-1`.

Closes gh-7154
This commit is contained in:
Madhura Bhave 2016-10-11 15:27:49 -07:00 committed by Phillip Webb
parent 84d0e8acd8
commit 0f5007d69d

View File

@ -83,12 +83,7 @@ public class EndpointWebMvcManagementContextConfiguration {
CorsConfiguration corsConfiguration = getCorsConfiguration(this.corsProperties);
EndpointHandlerMapping mapping = new EndpointHandlerMapping(endpoints,
corsConfiguration);
boolean disabled = this.managementServerProperties.getPort() != null
&& this.managementServerProperties.getPort() == -1;
mapping.setDisabled(disabled);
if (!disabled) {
mapping.setPrefix(this.managementServerProperties.getContextPath());
}
mapping.setPrefix(this.managementServerProperties.getContextPath());
if (this.mappingCustomizers != null) {
for (EndpointHandlerMappingCustomizer customizer : this.mappingCustomizers) {
customizer.customize(mapping);