From 4b15b2b94e6330ed4a0a7a8548aeb8078c19eb8f Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Thu, 10 Jul 2025 13:16:38 -0600 Subject: [PATCH] Add Migration Steps for Messaging Closes gh-17509 --- .../ROOT/pages/migration-7/messaging.adoc | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/modules/ROOT/pages/migration-7/messaging.adoc diff --git a/docs/modules/ROOT/pages/migration-7/messaging.adoc b/docs/modules/ROOT/pages/migration-7/messaging.adoc new file mode 100644 index 0000000000..c60dcec29d --- /dev/null +++ b/docs/modules/ROOT/pages/migration-7/messaging.adoc @@ -0,0 +1,40 @@ +== Messaging Migrations + +[[use-path-pattern]] +== Use PathPatternMessageMatcher by Default + +In Spring Security 7, `SimpDestMessageMatcher` is no longer supported and will use `PathPatternMessageMatcher` by default. + +To check how prepared you are for this change, you can publish this bean: + +[tabs] +====== +Java:: ++ +[source,java,role="primary"] +---- +@Bean +PathPatternMessageMatcherBuilderFactoryBean messageMatcherBuilder() { + return new PathPatternMessageMatcherBuilderFactoryBean(); +} +---- + +Kotlin:: ++ +[source,kotlin,role="secondary"] +---- +@Bean +fun messageMatcherBuilder(): PathPatternMessageMatcherBuilderFactoryBean { + return PathPatternMessageMatcherBuilderFactoryBean() +} +---- + +Xml:: ++ +[source,xml,role="secondary"] +---- + +---- +====== + +This will tell the Spring Security DSL to use `PathPatternMessageMatcher` for all message matchers that it constructs.