diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequest.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequest.java index 5d1c449052..f8f8e4729c 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequest.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequest.java @@ -132,7 +132,7 @@ public final class EndpointRequest { protected boolean ignoreApplicationContext(WebApplicationContext applicationContext) { ManagementPortType type = ManagementPortType.get(applicationContext.getEnvironment()); return type == ManagementPortType.DIFFERENT - && WebServerApplicationContext.hasServerNamespace(applicationContext, "management"); + && !WebServerApplicationContext.hasServerNamespace(applicationContext, "management"); } @Override