What is @ModelAttribute in Spring MVC?

后端 未结 13 853
一个人的身影
一个人的身影 2020-11-22 08:43

What is the purpose and usage of @ModelAttribute in Spring MVC?

相关标签:
13条回答
  • 2020-11-22 09:48

    Annotation that binds a method parameter or method return value to a named model attribute, exposed to a web view.

    public String add(@ModelAttribute("specified") Model model) {
        ...
    }
    
    0 讨论(0)
提交回复
热议问题