You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In future versions of Spring Security, we should move away from PathMatcher (used by AntPathRequestMatcher) and HandlerMappingIntrospector (used by MvcRequestMatcher) as they will be deprecated in future releases of Spring Framework.
This will also assist with efforts to simplify construction of path-based RequestMatchers.
Add PathPatternRequestMatcher Spring Framework 5 introduced PathPattern and PathPatternParser, and these are components that we should be able to standardize on, allowing this request matcher to be general-purpose, and not Spring MVC-specific like MvcRequestMatcher
*This would use neither HandlerMappingIntrospector nor PathMatcher
Simplify Specifying servletPath in the Java DSL Currently, this is only possible by constructing an MvcRequestMatcher, which is MVC-specific and requires a HandlerMappingIntrospector
Favor using PathPatternRequestMatcher We can default to Framework's PathPatternParser for MVC endpoints when HandlerMappingIntrospector#allHandlerMappingsUsePathPatternParser returns true
We can default to Framework's PathPatternParser for non-MVC endpoints
This should have an opt-in mechanism in order to remain passive.
Deprecate MvcRequestMatcher
Deprecate AntPathRequestMatcher
Deprecate any other usages of PathMatcher
The text was updated successfully, but these errors were encountered:
Hi, @evgeniycheban, thanks for volunteering! Some of this is already addressed in a draft PR, so allow me to clean that up first so it's clear what work remains. I'll report back here when that's ready, and then we can divvy out the remaining work.
In future versions of Spring Security, we should move away from
PathMatcher
(used byAntPathRequestMatcher
) andHandlerMappingIntrospector
(used byMvcRequestMatcher
) as they will be deprecated in future releases of Spring Framework.This will also assist with efforts to simplify construction of path-based
RequestMatcher
s.Add
PathPatternRequestMatcher
Spring Framework 5 introduced
PathPattern
andPathPatternParser
, and these are components that we should be able to standardize on, allowing this request matcher to be general-purpose, and not Spring MVC-specific likeMvcRequestMatcher
*This would use neither
HandlerMappingIntrospector
norPathMatcher
Simplify Specifying
servletPath
in the Java DSLCurrently, this is only possible by constructing an
MvcRequestMatcher
, which is MVC-specific and requires aHandlerMappingIntrospector
Favor using
PathPatternRequestMatcher
We can default to Framework's
PathPatternParser
for MVC endpoints whenHandlerMappingIntrospector#allHandlerMappingsUsePathPatternParser
returnstrue
We can default to Framework's
PathPatternParser
for non-MVC endpointsThis should have an opt-in mechanism in order to remain passive.
Deprecate MvcRequestMatcher
Deprecate AntPathRequestMatcher
Deprecate any other usages of
PathMatcher
The text was updated successfully, but these errors were encountered: