Add @Configuration to classes with @EnableXXXSecurity annotations

MSAL

Prior to Spring Security 6, @EnableXXXSecurity implicitly had @Configuration. Configuration was removed from the definitions of the @EnableSecurity definitions in Spring Security 6. Consequently classes annotated with @EnableXXXSecurity coming from pre-Boot 3 should have @Configuration annotation added.

org.openrewrite.java.spring.boot3.ConfigurationOverEnableSecurity

Required

Force add @Configuration regardless current Boot version.

mod run . --recipe=org.openrewrite.java.spring.boot3.ConfigurationOverEnableSecurity \ -P forceAddConfiguration=true

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