我有两个托管 Bean:
会话豆:
@Named(value = "sessionBean")
@SessionScoped
public class SessionBean implements Serializable {
private final Param param
SessionBean(Param param) {
this.param = param;
}
}
和 TypesBean:
@Named(value = "typesBean")
@RequestScoped
public class TypesBean {
@Inject
private SessionBean session;
}
该项目构建,但不部署:
部署期间发生错误:加载应用程序时出现异常:WELD-001410 注入点 [field] @Inject private com.example.TypesBean.session 具有不可代理的依赖项。有关详细信息,请参阅 server.log。
有什么问题?