@PostConstruct didn't get called by JSF if ManagedBean is inside jar library

后端 未结 2 811
攒了一身酷
攒了一身酷 2020-12-17 01:34

I\'m running with the following problem.

I have a few Managed Beans that are shared between, at this moment, two JSF applications. As I don\'t want to copy and paste

2条回答
  •  悲哀的现实
    2020-12-17 02:14

    Also note that post-construct method must not be declared to throw any checked exception. Message from stderr:

    Method 'public void my.app.MyBean.postConstruct() throws java.lang.Exception' marked with the 'javax.annotation.PostConstruct' annotation cannot declare any checked exceptions. This method will be ignored.
    

提交回复
热议问题