From d5f986f73370729bc3d0d3caf02c46c1c77fa62d Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:19:21 -0600 Subject: [PATCH] Deprecate createMvcMatchers Issue gh-16631 --- .../config/annotation/web/AbstractRequestMatcherRegistry.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/src/main/java/org/springframework/security/config/annotation/web/AbstractRequestMatcherRegistry.java b/config/src/main/java/org/springframework/security/config/annotation/web/AbstractRequestMatcherRegistry.java index 4b9db8bd49..ba0a291653 100644 --- a/config/src/main/java/org/springframework/security/config/annotation/web/AbstractRequestMatcherRegistry.java +++ b/config/src/main/java/org/springframework/security/config/annotation/web/AbstractRequestMatcherRegistry.java @@ -112,7 +112,11 @@ public abstract class AbstractRequestMatcherRegistry { * @param method the HTTP method to use or null if any should be used * @param mvcPatterns the Spring MVC patterns to match on * @return a List of {@link MvcRequestMatcher} instances + * @deprecated Please use + * {@link org.springframework.security.web.servlet.util.matcher.PathPatternRequestMatcher.Builder} + * instead */ + @Deprecated protected final List createMvcMatchers(HttpMethod method, String... mvcPatterns) { Assert.state(!this.anyRequestConfigured, "Can't configure mvcMatchers after anyRequest"); ResolvableType type = ResolvableType.forClassWithGenerics(ObjectPostProcessor.class, Object.class);