此规则会标记是否使用了 javax.faces.bean 包中不推荐的接口和注释。 以下接口和注释替换为其他包中的接口和注释:
不推荐类 |
JavaEE8 类 |
|---|---|
javax.faces.bean.ApplicationScoped |
javax.enterprise.context.ApplicationScoped |
javax.faces.bean.CustomScoped |
javax.enterprise.context.spi.Context |
javax.faces.bean.ManagedProperty |
javax.faces.annotation.ManagedProperty |
javax.faces.bean.NoneScoped |
javax.enterprise.context.Dependent |
javax.faces.bean.RequestScoped |
javax.enterprise.context.RequestScoped |
javax.faces.bean.SessionScoped |
javax.enterprise.context.SessionScoped |
javax.faces.bean.ViewScoped |
javax.faces.view.ViewScoped |
javax.faces.bean.ManagedBean 通常已替换为受管 Bean 规范,特别是 CDI 规范中的依赖关系注入,作用域和命名。 请注意,应用程序作用域限定的 Bean 的主动属性是通过观察 javax.enterprise.context.Initialized 事件 javax.enterprise.context.ApplicationScoped .
没有直接替换 javax.faces.bean.ReferencedBean 而不是在 faces-config.xml 中使用 XML 变体