@ModelAttribute: Difference between revisions
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
=Internal= | =Internal= | ||
* [[Spring_MVC_Concepts#Controller_Annotations| | * [[Spring_MVC_Concepts#Controller_Annotations|Controller]] | ||
* [[Spring_MVC_Concepts#Model|Model]] | |||
=Overview= | =Overview= |
Revision as of 23:54, 14 October 2018
Internal
Overview
@ModelAttribute ensures that the corresponding object will be created in the model.
public class ...Controller {
@ModelAttribute(name = "something")
public Something something() {
return new Something();
}