简体   繁体   中英

Spring MVC What other values can be added to @initBinder, besided bean names?

Can you set for the value of @InitBinder something beside the bean name, in spring mvc? For instance, the method names?

AFAIK, you can only put the name of a bean as parameter of the @InitBinder annotation. But you can allways use a different bean name in each controller method, thanks to the @ModelAttribute ("bean_name") annotation. That way you can configure your WebDataBinder for each method.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM