Convert requestMatchers chain to securityMatcher

MSAL

Converts HttpSecurity.requestMatchers().antMatchers(...) and similar patterns to HttpSecurity.securityMatcher(...). The no-arg requestMatchers() method returns a RequestMatcherConfigurer that is not a configurer in the lambda DSL sense, so it should be replaced with the securityMatcher() method introduced in Spring Security 5.8.

org.openrewrite.java.spring.security5.ConvertSecurityMatchersToSecurityMatcher
mod run . --recipe=org.openrewrite.java.spring.security5.ConvertSecurityMatchersToSecurityMatcher

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