There is no such thing as perfect programming, but we shouldn’t be discouraged because programming is a constant pursuit of perfection.
Everyone knows that the main core of Spring is IOC. What is IOC? Ioc is a container that implements inversion of control. What is inversion of control? Is to change the usual form of a new object into a configuration to create objects in dependency injection mode when needed. The most important part of IOC is ioc container. We generally take ApplicatioinContext as the representative of IOC container. But why ApplicationContext and not the top-level BeanFactory? As anyone who has seen a bit of Spring source code knows, ApplicationContext, while inheriting from BeanFactory, is actually an operation on BeanFactory. The core process looks like this:
- Load parsing configuration
- Standardization of BeanDefinition
- Create a Bean
I’m going to simplify it a little bit, and I’ll go into details one by one.
For more information, please pay attention to the official account: