[Spring] 若successView是redirect:/,Model中的值会被转换成参数

[Spring MVC] 如果successView是redirect:/…,Spring会自动把Model中的值作为参数附在URL的后面

如: model.put("amount",new Integer(100);

       return new ModelAndView("redirect:/hi.do",model);

则浏览器收到的URL就是

     http://…/hi.do?amount=100

Leave a Comment

Your email address will not be published.

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