我有一个Android应用程序,我试图执行一个项目。
单击复选框后执行该项目,弹出后端的存储库将更新执行详细信息。
现在我想将复选框的状态也存储在数据库中。例如。选中该复选框后,如果取消选中该复选框,则数据库应将其存储为true和false。
以下是我的代码
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.CREATED)
@Transactional(Transactional.TxType.REQUIRES_NEW)
public void ItemExecution(@RequestBody ItemExecution itemExecution {
Item item = itemRepository.findOne(itemExecution.getItem().getId()));
itemExecutionService.executeItem(itemExecution,item,itemExecution.isExecutionState());
}
我收到以下错误
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token
at [Source: java.io.PushbackInputStream@609f7353; line: 10, column: 13]
这是保存布尔值的正确方法吗?任何帮助将不胜感激。谢谢