Constructing an MvcRequestMatcher
can be confusing since it's unclear where to obtain a HandlerMappingIntrospector
from.
Spring Security could publish a prototype bean like so to make that easier:
@Bean
@Scope("prototype")
MvcRequestMatcher.Builder mvcRequestMatcherBuilder(HandlerMappingIntrospector introspector) {
return new MvcRequestMatcher.Builder(introspector);
}
Comment From: jzheaux
Due to https://github.com/spring-projects/spring-security/issues/13794, this has been reopened to give us more time to assess the right solution.
Comment From: jzheaux
I'm closing this ticket since it is superceded by AntPathRequestMatcher
's and MvcRequestMatcher
's removal.
Please use PathPatternRequestMatcher
instead.