SpringMVC Web配置启动
有两种方式,ContextLoaderListener和ContextLoaderPlugIn
首先配置
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
@API ContextLoader
Performs the actual initialization work for the root application context. Called by ContextLoaderListener
.
Looks for a "contextClass"
parameter at the web.xml
context-param level to specify the context class type, falling back to the default of XmlWebApplicationContext
if not found.
WebApplicationContext
implementation which takes its configuration from XML documents, understood by an