SpringMvc出现Jsp页面不能正常解析成html网页

 1     <!-- Spring mvc配置 -->
 2     <servlet>
 3         <servlet-name>springMvc</servlet-name>
 4         <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
 5         <init-param>
 6             <param-name>contextConfigLocation</param-name>
 7             <param-value>classpath:SpringMvc.xml</param-value>
 8         </init-param>
 9         <load-on-startup>1</load-on-startup>
10     </servlet>
11     <servlet-mapping>
12         <servlet-name>springMvc</servlet-name>
13         <url-pattern>/</url-pattern>
14     </servlet-mapping>

如果你在<url-pattern>/</url-pattern>编程<url-pattern>/*</url-pattern>Springmvc将会对jsp进行拦截导致其不能正常显示

posted @ 2017-04-09 12:08  lonecloud  阅读(3624)  评论(0编辑  收藏  举报
我的博客即将同步至 OSCHINA 社区,这是我的 OSCHINA ID:lonecloud,邀请大家一同入驻:https://www.oschina.net/sharing-plan/apply