spring security前进后退失效处理

在controller里边这么处理一下就可以了:

    public ModelAndView login(Locale locale, Model model, SecurityContextHolderAwareRequestWrapper  request
            , final HttpServletResponse response) {
        response.setHeader("Cache-Control", "no-cache");
        response.setHeader("Cache-Control", "no-store");    //firefox
        response.setDateHeader ("Expires", 0);

经测试firefox,chrome和ie浏览器都能用


你可能感兴趣的:(spring,浏览器,Security,chrome,firefox,login)