SpringBoot之启动过程简析

注:分析的版本是1.4.8。git

             

                                                     图1 SpringApplication.run的时序图github

    图1的原图在Github上。spring

  1.     步骤1是调用SpringApplication的静态run方法(步骤1),这个方法会实例化一个SpringApplication(步骤3),并调用SpringApplication的另外一个run方法(步骤8)。
  2.     步骤13。SpringBoot启动时,会打印出"SpringBoot",咱们能够修改打印出来的内容,好比有时会看到佛祖......这个在步骤13中。
  3.     步骤18。若是看过Spring的applicationContext的源码,那么应该知道步骤18中在作些什么。

      

    有不少地方,仍是不理解,待后面慢慢完善吧!springboot

 

Reference:

    1.Springboot-1.4.8的Github:https://github.com/spring-projects/spring-boot/tree/1.4.xapp

相关文章
相关标签/搜索