spring mvc使用html页面,使用Spring MVC的纯HTML页面应用程序
在Spring MVC所有的請(qǐng)求經(jīng)過(guò)FrontController - DispatcherServlet的
有你需要告訴Spring allowe JSP和HTML都在你的情況
例
dispatcher-servlet.xml:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
indexController
class="org.springframework.web.servlet.view.InternalResourceViewResolver"
p:prefix="/WEB-INF/jsp/"
p:suffix=".jsp" />
class="org.springframework.web.servlet.mvc.ParameterizableViewController"
p:viewName="index" />
總結(jié)
以上是生活随笔為你收集整理的spring mvc使用html页面,使用Spring MVC的纯HTML页面应用程序的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: leetcode 73 矩阵置零 C++
- 下一篇: Docker Toolbox下配置国内镜