在web.xml中配置spring使用:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListeber</<listener-class>>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
其中contextConfigLocation在ContextConfigListener类中的默认值是
/WEB-INF/applicationContext.xml