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";
}
}
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: