Migrate AntPathRequestMatcher to PathPatternRequestMatcher

Proprietary

In Spring Security 6.5, AntPathRequestMatcher is deprecated in favor of PathPatternRequestMatcher. This recipe migrates static method calls, constructor usage and their method references to the new pattern in both Java and Kotlin sources. It marks the code for a manual migration instead where there is no direct equivalent: the case-insensitive and UrlPathHelper overloads, antMatcher(HttpMethod), an HTTP method that may be null or empty at runtime, and patterns with ** in the middle.

io.moderne.java.spring.security6.MigrateAntPathRequestMatcher
mod run . --recipe=io.moderne.java.spring.security6.MigrateAntPathRequestMatcher

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.