mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-12 21:33:30 +00:00
Favor PathPatternMessageMatcher when activated
Issue gh-16500
This commit is contained in:
parent
bc9ae1eed6
commit
a683a3a730
@ -31,6 +31,9 @@ final class MessageMatcherAuthorizationManagerConfiguration {
|
||||
MessageMatcherDelegatingAuthorizationManager.Builder messageAuthorizationManagerBuilder(
|
||||
ApplicationContext context) {
|
||||
MessageMatcherFactory.setApplicationContext(context);
|
||||
if (MessageMatcherFactory.usesPathPatterns()) {
|
||||
return MessageMatcherDelegatingAuthorizationManager.builder();
|
||||
}
|
||||
return MessageMatcherDelegatingAuthorizationManager.builder()
|
||||
.simpDestPathMatcher(
|
||||
() -> (context.getBeanNamesForType(SimpAnnotationMethodMessageHandler.class).length > 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user