springboot-mybatis 整合出现的莫名其妙的错误

springboot +mybatis

实体类Books中的构造函数被重写了,但是没有空参的和全参构造。这时候操作数据库就会报如下莫名奇妙的异常。

加上无参或者空参就没问题了。

 

2020-04-10 15:33:22.772 ERROR 48424 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Error attempting to get column 'bookName' from result set.  Cause: java.sql.SQLDataException: Cannot determine value type from string 'Java'
; Cannot determine value type from string 'Java'; nested exception is java.sql.SQLDataException: Cannot determine value type from string 'Java'] with root cause

com.mysql.cj.exceptions.DataConversionException: Cannot determine value type from string 'Java'

springboot-mybatis 整合出现的莫名其妙的错误_第1张图片 

你可能感兴趣的:(springboot)