Substitute removed Faces managed beans
MSALThis recipe substitutes Faces Managed Beans, which were deprecated in JavaServer Faces 2.3 and have been removed from Jakarta Faces 4.0.
org. openrewrite. java. migrate. jakarta. FacesManagedBeansRemovedmod run . --recipe= org. openrewrite. java. migrate. jakarta. FacesManagedBeansRemovedInstall 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.
- Change type
javax.faces.bean.ApplicationScopedtojakarta.enterprise.context.ApplicationScoped - Change type
jakarta.faces.bean.ApplicationScopedtojakarta.enterprise.context.ApplicationScoped - Change type
javax.faces.bean.ManagedPropertytojakarta.faces.annotation.ManagedProperty - Change type
jakarta.faces.bean.ManagedPropertytojakarta.faces.annotation.ManagedProperty - Remove annotation attribute
@ManagedProperty(name) - Change type
NoneScopedtoDependent - Change type
NoneScopedtoDependent - Change type
javax.faces.bean.RequestScopedtojakarta.enterprise.context.RequestScoped - Change type
jakarta.faces.bean.RequestScopedtojakarta.enterprise.context.RequestScoped - Change type
javax.faces.bean.SessionScopedtojakarta.enterprise.context.SessionScoped - Change type
jakarta.faces.bean.SessionScopedtojakarta.enterprise.context.SessionScoped - Change type
javax.faces.bean.ViewScopedtojakarta.faces.view.ViewScoped - Change type
jakarta.faces.bean.ViewScopedtojakarta.faces.view.ViewScoped - Update Faces
@ManagedBeanto use CDI@Named