标签:
web.xml中配置dispatcherServlet类
<!-- 监听Spring容器配置 --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- 业务层和持久层的spring配置文件,这些配置文件为父spring容器所应用 --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath*:applicationContext.xml</param-value> </context-param> <!-- 监听Spring容器配置 --> <servlet> <servlet-name>spring</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring-mvc.xml</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>*.html</url-pattern> 请求过滤后缀 </servlet-mapping>
标签:
原文地址:http://www.cnblogs.com/peng111/p/5759279.html