Field error in object ‘xxx‘ on field ‘xxx‘: rejected value [[],[],[]....]

created at 11-03-2021 views: 86

problem

When using the ssm framework for the project, a Field error in object ‘xxx’ on field ‘xxx’: rejected value [[],[],[]…] problem occurred.

Solution

When the value passed from the front end is null, the value cannot be converted to the corresponding type when the value is passed, and then an error is reported before the code of the controller is loaded.
E.g:

url: $ {pageContext.request.contextPath}/book/toUpdatePage/${book.getBookID()}

If the ${book.getBookID()} part is null, there will be a Field error in object ‘xxx’ on field ‘xxx’: rejected value [[],[],[]…] problem.

created at:11-03-2021
edited at: 11-03-2021: