在springDispatcherServlet-servlet.xml中添加以下两句spring
<mvc:view-controller path="/success" view-name="success"/> <mvc:annotation-driven></mvc:annotation-driven>
第一句指定逻辑视图名称所对应的物理路径markdown
可是只写第一句会致使经过controller访问该视图404,因此加上第二句便可。mvc