引用:http://zhidao.baidu.com/question/427882147.html&__bd_tkn__=26aa4b6c3d268434170aa26fb8b837ae870bd1fc8078338d51fed8133ea5c69d362ad36bb4bcda3b39bb3949f6bbe47087ac3af56e60b1f4e7eb60157c5efa3a9565a8fc590f03de01252778a443ce0c3e77ee057d5aca88d348420f0121375ccf1303344bb3a9acee7988accbdc8d03ca3527f549af
在你web.xml里面配置这个spring的servlet的时候按如下代码编写即可
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<!-- 这个地方可以是WEB-INF,也可以是其他地方,下面配置2选1啊 -->
<param-value>/WEB-INF/springweb/*-servlet.xml</param-value>
<param-value>classpath:spring/servlet/*-servlet.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>