扫码加入数据分析学习群
严重: Servlet.service() for servlet [spring-mvc] in context with path [/DBDX] threw exception [Request processing failed; nested exception is com.dbdx.util.DaoException: 数据库操作失败!; nested exception is org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into z_praise(kt_id,t_id,date,deleted) values(?,?,?,?)]; Data truncated for column 'date' at row 1; nested exception is java.sql.SQLException: Data truncated for column 'date' at row 1] with root cause
java.sql.SQLException: Data truncated for column 'date' at row 1
在看到SQLException后开始以为是sql语句写错的原因,但反复检查后还是不行,后发现是数据库表的类型是int可能数据长度不够,改为varchar解决。
添加CDA认证专家【维克多阿涛】,微信号:【cdashijiazhuang】,提供数据分析指导及CDA考试秘籍。已助千人通过CDA数字化人才认证。欢迎交流,共同成长!