Spring Framework配置
web.xml配置
<!-- 配置ContextLoaderListener -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath*:spring/spring-*.xml
</param-value>
</context-param>
<!-- 配置DispatcherServlet-->
<servlet>
<servlet-name>ats_mem</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring/mvc-*.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ats_mem</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
配置完成后,spring的Web项目就可以正常启动了