SpringMVC 多视图解析器 跳转问题
在SpringMVC的配置文件中加入以下配置:
<!-- 下面红色的配置必须要在-->
<mvc:default-servlet-handler />
<bean id="viewResolver"
class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver" lazy-init="false">
<property name="contentType" value="text/html; charset=UTF-8"/>
<property name="exposeSpringMacroHelpers" value="true" />
<property name="requestContextAttribute" value="rc" />
<property name="prefix" value="/" />
<property name="suffix" value=".ftl" />
<property name="order" value="0"/>
</bean>
<bean id="viewResolverCommon" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/form/"/>
<property name="suffix" value=".html"/>
<property name="viewClass">
<value>org.springframework.web.servlet.view.InternalResourceView</value>
</property>
<property name="order" value="1"/>
</bean>