在做项目的时间遇到报错:
Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Invalid JSON text: "The document is empty." at position 0 in value for column 'request.params'.
在MySQL数据库中params字段为json范例,在项目中使用MyBatis-Plus可以将json范例的params字段映射为String范例。但是在使用MyBatis-Plus进行插入操纵时,将String范例的params插入MySQL就会报错。为解决这个题目需要在entity中将params字段映射为JSONObject范例。