[英]Is there a way to specify the order in which ApplicationScoped managed beans are initialized?
我在想,因为我遇到了ApplicationScoped
托管bean和带有
static {
//some code that accesses an application bean
}
其中的一部分扩展了ApplicationScoped
bean
我在Tomcat 7中使用JSF 2.1.17。
首先,这只是糟糕的设计。 应用程序范围的bean不是静态的,它们只是应用程序范围的。
将一个作为另一个的@ManagedProperty
注入,然后在@PostConstruct
执行作业。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.