How to add Object in using model.addAttributes in Spring MVC

后端 未结 4 657
醉酒成梦
醉酒成梦 2021-02-06 16:56

I\'m trying to retrieve the user information from DB and display in the front end (JSP) using Spring MVC.

Inside the controller, currently I\'m adding the following cod

4条回答
  •  说谎
    说谎 (楼主)
    2021-02-06 17:00

    Or there is another option - to use @ModelAttribute like this: http://krams915.blogspot.com/2010/12/spring-3-mvc-using-modelattribute-in.html (contains Model and ModelAttribute examples).

提交回复
热议问题