Migrate to Spring Security 7.0
MSALMigrate applications to the latest Spring Security 7.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
org. openrewrite. java. spring. security7. UpgradeSpringSecurity_7_0mod run . --recipe= org. openrewrite. java. spring. security7. UpgradeSpringSecurity_7_0Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Upgrade Gradle or Maven dependency versions
org.springframework.security:*:7.0.x - Remove throws exception in
SecurityConfigurermethodsinitandconfigure - Widen the
Supplierparameter ofAuthorizationManager#checkoverrides - Change method name
org.springframework.security.authorization.AuthorizationManager check(..)toauthorize - Replace constant with literal value
- Replace constant with literal value
- Change method name
org.springframework.security.authorization.event.AuthorizationEvent getAuthorizationDecision()togetAuthorizationResult - Migrate the OpenSAML 4 classes of Spring Security to their OpenSAML 5 counterparts