What happened when the SpringBoot project started?

What happened when the SpringBoot project started?

Insert picture description here
When the SpringBoot project starts, it first performs automatic configuration based on the annotation description on the startup entry class and scans the classes in the specified package and sub-packages for loading, and then detects whether the class has the annotation description specified in the Spring framework (such as @Component, @Controller,@Service, etc.). If so, the class will be handed over to the implementation class object of the BeanFactory factory interface in the Spring framework. This factory object will create an instance of the Bean based on anti-reflection. If the life cycle method is specified, the life cycle method will also be called. After the instance is created, the Spring framework will also store the instance in containers of different scopes based on the scope description of the class. To realize the scientific application of Bean objects.

Guess you like

Origin blog.csdn.net/DoChengAoHan/article/details/106803100