Spring Boot boot process

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.