An Errors/BindingResult argument is expected to be declared immediately after the model attribute, the @RequestBody or the @RequestPart arguments to which they apply: public com.rongrong.springboot.de


報錯信息:

An Errors/BindingResult argument is expected to be declared immediately after the model attribute, the @RequestBody or the @RequestPart arguments to which they apply: public com.rongrong.springboot.demo.domain.Student com.rongrong.springboot.demo.controller.StudentController.studentAddByParam(java.lang.String,java.lang.Integer,java.lang.String,java.lang.String,org.springframework.validation.BindingResult)

處理方法:BindingResult 要跟在實體類之后,
如:

@Valid Student student, BindingResult bindingResult

 

參考鏈接:https://blog.csdn.net/qq_28643817/article/details/98492052

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM