是否有 spring 3.1 MVC 注释来关闭浏览器响应缓存?
SpringMVC 3.1 中是否有一些注释可以关闭 MVC 控制器方法上的浏览器缓存?
@Controller
@RequestMapping("/status")
public class StatusController {
@RequestMapping(method=RequestMethod.GET)
//anyway to have an annotation here that turns of all the http caching headers?
public String get()
{
// do some work here
return "status";
}
}
Is there some annotation in SpringMVC 3.1 to turn off browser caching on an MVC controller method?
@Controller
@RequestMapping("/status")
public class StatusController {
@RequestMapping(method=RequestMethod.GET)
//anyway to have an annotation here that turns of all the http caching headers?
public String get()
{
// do some work here
return "status";
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,没有注释,但有一种方法可以使用拦截器通过 XML 配置它。例如:
As far as I can tell there isn't an annotation, but there is a way to configure it via XML using an interceptor. For example: