【从入门到放弃-SpringBoot】SpringBoot源码分析-WebServer
前言
前文【从入门到放弃-SpringBoot】SpringBoot源码分析-启动中,我们分析了springboot的启动过程,在refreshContext中调用了onRefresh。在SERVLET类型应用中,实际实例化的应用上下文为ServletWebServerApplicationContext。
其onRefresh中调用了createWebServer。我们在本文中一起分析下是一个web应用是如何启动的。
ServletWebServerApplicationContext::createWebServer
private void createWebServer() {
WebServer webServer = this.webServer;
ServletContext servletContext