1: Determine if it is a Web environment
2: Load all the meta-inf/spring.factories Applicationcontextinitializer under Classpath
3: Load all the meta-inf/spring.factories Applicationlistener under Classpath
4: Infer the class where the Main method resides
5: Start execution of the Run method
6: Set java.awt.headless system variable
7: Load all the meta-inf/spring.factories Springapplicationrunlistener under Classpath
8: Perform the Started method of all Springapplicationrunlistener
9: Instantiating a Applicationarguments object
10: Create Environment
11: Configure environment, mainly to configure the parameters of the Run method into the environment
12: Perform the environmentprepared method of all Springapplicationrunlistener
13: If it is not a web environment, but the environment of the web, then the environment of the web is converted into a standard environment
14: Print Banner
15: Initialize ApplicationContext
If it is a web environment, instantiate the Annotationconfigembeddedapplicationcontext object
If not the Web environment: Annotationconfigapplicationcontext
16: If the beannamegenerator is not empty, the Beannamegenerator object is injected into the context
17: Callback All the Applicationcontextinitializer methods
18: Perform all the contextprepared methods of the Springapplicationrunlistener
19: Inject applicationarguments into the spring container in turn, Banner
20: Load all sources into context
21: Perform all the contextloaded methods of the Springapplicationrunlistener
22: Perform the Refresh method of the context and invoke the Registershutdownhook method of the context
23: Callback, gets all the Applicationrunner,commandlinerunner interfaces in the container, and then sorts the calls in sequence
24: Perform all the finished methods of the Springapplicationrunlistener
25: Boot Complete
Spring Boot boot process