mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
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:
parent
84d0e8acd8
commit
0f5007d69d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user