zoukankan      html  css  js  c++  java
  • Spring boot内嵌服务器tomcat的启动过程

    Spring boot内嵌服务器tomcat的启动过程

    开始org.springframework.boot.SpringApplication#run(java.lang.Class<?>, java.lang.String...)

    org.springframework.boot.SpringApplication#createApplicationContext

    • org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext

    • org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext

    1. org.springframework.boot.SpringApplication#refreshContext

    2. org.springframework.boot.SpringApplication#refreshContext

    3. org.springframework.boot.SpringApplication#refresh

    4. org.springframework.context.support.AbstractApplicationContext#refresh

    5. org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext#refresh

    6. org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext#onRefresh

      →createWebServer创建内嵌的tomcat web服务器

    7. org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext#finishRefresh

      启动服务器org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext#startWebServer

      发布事件

      org.springframework.boot.web.servlet.context.ServletWebServerInitializedEvent#ServletWebServerInitializedEvent 主要用来获得本地端口

      增加 server.ports 属性源

  • 相关阅读:
    团队开发冲刺2.3(2015.5.27)
    团队开发冲刺2.2(2015.5.26)
    团队开发冲刺2.1(2015.5.26)
    团队开发冲刺1.6(2015.5.14)
    团队开发冲刺1.5(2015.5.13)
    团队开发冲刺1.4(2015.5.12)
    团队开发冲刺1.3(2015.5.11)
    团队开发冲刺1.2(2015.5.10)
    团队开发冲刺1.1(2015.5.9)
    找1
  • 原文地址:https://www.cnblogs.com/windlog/p/13675930.html
Copyright © 2011-2022 走看看