Skip to content

Commit dbf93ac

Browse files
committed
Check for spring-security-web on Classpath
This commit refines the check for adding AuthorizationWebProxyConfiguration to the application context. The web-based authorization proxy support is intended for applying Spring Security Method Security primitives to Spring Web components; as such, this implies a dependency on Spring Security Web. Closes gh-18307
1 parent ae5673b commit dbf93ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/src/main/java/org/springframework/security/config/annotation/method/configuration/MethodSecuritySelector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ final class MethodSecuritySelector implements ImportSelector {
4242
.isPresent("org.springframework.security.data.aot.hint.AuthorizeReturnObjectDataHintsRegistrar", null);
4343

4444
private static final boolean isWebPresent = ClassUtils
45-
.isPresent("org.springframework.web.servlet.DispatcherServlet", null);
45+
.isPresent("org.springframework.security.web.util.ThrowableAnalyzer", null);
4646

4747
private static final boolean isObservabilityPresent = ClassUtils
4848
.isPresent("io.micrometer.observation.ObservationRegistry", null);

0 commit comments

Comments
 (0)