1 The main operations in the life cycle
The first step, new instantiates the bean
The second step, dependency injection, is to copy the properties of the bean
The third step, the bean's setBeanName() method
The fourth step, the setBeanFactory() method of the bean
The fifth step, the setApplicationContext() method of the bean
The sixth step, the init-method attribute of the configuration file
container closed
The seventh step, the destroy() method of the bean
The eighth step, destroy-method attribute of the configuration file
2 Purpose of getting ApplicationContext in bean
First, with the ApplicationContext, you can directly get other beans.