我正在寻找一个特定的Spring功能,可以在注销后使用后退按钮阻止用户返回限制区域。我找不到任何东西。
是否有特定的Spring功能来处理我的问题,或者我应该使用response.setHeader(.....
等?
答案 0 :(得分:1)
春天没有直接功能,您可以使用interceptor
来完成这项工作。与servlet过滤器相同,将cacheSeconds
设置为0
<mvc:annotation-driven/>
<mvc:interceptors>
<bean id="webContentInterceptor"
class="org.springframework.web.servlet.mvc.WebContentInterceptor">
<property name="cacheSeconds" value="0"/>
<property name="useExpiresHeader" value="true"/>
<property name="useCacheControlHeader" value="true"/>
<property name="useCacheControlNoStore" value="true"/>
</bean>
</mvc:interceptors>
这解释了WebContentInterceptor
。还有nice expalanation这里。