27.3.3 The EmbeddedWebApplicationContext
在Spring Boot引擎下,使用一个新的ApplicationContext
类型,来提供对嵌入式servlet container的支持。EmbeddedWebApplicationContext
是一个特殊的WebApplicationContext
,它通过搜索EmbeddedServletContainerFactory
bean来启动自身。一般TomcatEmbeddedServletContainerFactory
, JettyEmbeddedServletContainerFactory
, or UndertowEmbeddedServletContainerFactory
将会自动配置
你通常不需要去实现这些类。大多数应用都会自动配置这些类,而且恰当的
ApplicationContext
和EmbeddedServletContainerFactory
都会自动为你创建。