The following is in the order of execution:
1. Self-construction method
2,
@PostConstruct// import javax.annotation.PostConstruct; public void test(){ System.out.println("PostConstruct-------------test"); }
3. Implement the InitializingBean interface to override the afterPropertiesSet method
@Override public void afterPropertiesSet() throws Exception { System.out.println("afterPropertiesSet-------------test"); }