我常在Spring Controller 中使用的 toSv()

把successView当作http parameter传进来,可以方便重用Controller

==========================================================

           private ModelAndView toSv(HttpServletRequest request,

HttpServletResponse response, Map model) {

String sv = request.getParameter("sv");

return new ModelAndView(sv, model);

}

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.