Skip to content

Commit a683a3a

Browse files
committed
Favor PathPatternMessageMatcher when activated
Issue gh-16500
1 parent bc9ae1e commit a683a3a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

config/src/main/java/org/springframework/security/config/annotation/web/socket/MessageMatcherAuthorizationManagerConfiguration.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ final class MessageMatcherAuthorizationManagerConfiguration {
3131
MessageMatcherDelegatingAuthorizationManager.Builder messageAuthorizationManagerBuilder(
3232
ApplicationContext context) {
3333
MessageMatcherFactory.setApplicationContext(context);
34+
if (MessageMatcherFactory.usesPathPatterns()) {
35+
return MessageMatcherDelegatingAuthorizationManager.builder();
36+
}
3437
return MessageMatcherDelegatingAuthorizationManager.builder()
3538
.simpDestPathMatcher(
3639
() -> (context.getBeanNamesForType(SimpAnnotationMethodMessageHandler.class).length > 0)

0 commit comments

Comments
 (0)