27.3.3 EmbeddedWebApplicationContext

Spring Boot底层使用一种新的ApplicationContext类型,用于对内嵌servlet容器的支持。EmbeddedWebApplicationContext是一种特殊类型的WebApplicationContext,它通过搜索到的单个EmbeddedServletContainerFactory bean来启动自己,通常TomcatEmbeddedServletContainerFactoryJettyEmbeddedServletContainerFactoryUndertowEmbeddedServletContainerFactory将被自动配置。

你不需要关心这些实现类,大部分应用都能被自动配置,并根据你的行为创建合适的ApplicationContextEmbeddedServletContainerFactory