実行順に以下を示します。
1.自己構築法
2、
@ PostConstruct // import javax.annotation.PostConstruct; public void test(){ System.out.println( "PostConstruct ------------- test"); }
3. InitializingBeanインターフェースを実装して、afterPropertiesSetメソッドをオーバーライドします
@Override public void afterPropertiesSet()throws Exception { System.out.println( "afterPropertiesSet ------------- test"); }