Migrate ResourceServerConfigurerAdapter to a SecurityFilterChain bean

Proprietary

Replaces the Spring Security OAuth @EnableResourceServer and ResourceServerConfigurerAdapter combination with a SecurityFilterChain bean calling oauth2ResourceServer(..), as provided by spring-security-oauth2-resource-server. Classes that also override configure(ResourceServerSecurityConfigurer) are left untouched and marked instead: those calls have no faithful equivalent, and dropping resourceId in particular would silently stop the resource server validating the aud claim.

io.moderne.java.spring.security.oauth.MigrateResourceServerConfigurerAdapter
mod run . --recipe=io.moderne.java.spring.security.oauth.MigrateResourceServerConfigurerAdapter

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