From 0f5007d69d7bf762f4dff02ed80c2462f9f59495 Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Tue, 11 Oct 2016 15:27:49 -0700 Subject: [PATCH] Drop superfluous disabled check Remove EndpointWebMvcManagementContextConfiguration `disabled` logic since the configuration should even be processed when the management port is `-1`. Closes gh-7154 --- .../EndpointWebMvcManagementContextConfiguration.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcManagementContextConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcManagementContextConfiguration.java index 154d7e9fb1..d4752b5441 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcManagementContextConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcManagementContextConfiguration.java @@ -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);