messaging.adoc 972 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. == Messaging Migrations
  2. [[use-path-pattern]]
  3. == Use PathPatternMessageMatcher by Default
  4. In Spring Security 7, `SimpDestMessageMatcher` is no longer supported and will use `PathPatternMessageMatcher` by default.
  5. To check how prepared you are for this change, you can publish this bean:
  6. [tabs]
  7. ======
  8. Java::
  9. +
  10. [source,java,role="primary"]
  11. ----
  12. @Bean
  13. PathPatternMessageMatcherBuilderFactoryBean messageMatcherBuilder() {
  14. return new PathPatternMessageMatcherBuilderFactoryBean();
  15. }
  16. ----
  17. Kotlin::
  18. +
  19. [source,kotlin,role="secondary"]
  20. ----
  21. @Bean
  22. fun messageMatcherBuilder(): PathPatternMessageMatcherBuilderFactoryBean {
  23. return PathPatternMessageMatcherBuilderFactoryBean()
  24. }
  25. ----
  26. Xml::
  27. +
  28. [source,xml,role="secondary"]
  29. ----
  30. <b:bean class="org.springframework.security.config.web.messaging.PathPatternMessageMatcherBuilderFactoryBean"/>
  31. ----
  32. ======
  33. This will tell the Spring Security DSL to use `PathPatternMessageMatcher` for all message matchers that it constructs.