1.spring 3.1 RedirectAttributes可以解决重复表单的提交
@RequestMapping(value="/success.html",method=RequestMethod.GET) public String successView(HttpServletRequest request){ Map map = RequestContextUtils.getInputFlashMap(request); if (map!=null) return "success"; else return "redirect:someOtherView"; }
参考:
http://viralpatel.net/blogs/spring-mvc-flash-attribute-example/
http://www.tikalk.com/redirectattributes-new-feature-spring-mvc-31
2.spring 3.1
org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping ==>org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter
==>org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
扫描二维码关注公众号,回复:
582574 查看本文章