Processing of
the initialization method In this note, the use of the seventh post processor is recorded. This note will briefly summarize it.
- In the spring source code, three initialization methods are provided, and spring also specifies the priority of the three initialization methods: @PostConstruct> InitializingBean interface> init-method
- When the initialization method is called, only @PostConstruct is called in the seventh post processor. In fact, the logic is the same as the idea of @Autowired. First find the annotated method, and then execute the corresponding method
- For the remaining two initialization methods, they are executed in the same method, and the order of execution is: the next method in the seventh post processor is to call the corresponding methods of the latter two initialization methods