@ModelAttribute

From NovaOrdis Knowledge Base
Revision as of 23:54, 14 October 2018 by Ovidiu (talk | contribs) (→‎Internal)
Jump to navigation Jump to search

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();
    }