本文主要是介绍Data truncation: Incorrect string value: '\xE5\xB9\xB43\xE6\x9C...' for column 'reg_time' at row 1,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Caused by: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect string value: ‘\xE5\xB9\xB43\xE6\x9C…’ for column ‘reg_time’ at row 1 at
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:104) at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974) at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1113) at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1061) at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1381) at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1046) at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175) … 64 more
在做Spring Data JPA练习时,我猜测是因为乱码之后的字符串值超出了,字段名定义的长度,后将数据库表的编码格式改为utf-8解决问题。
这篇关于Data truncation: Incorrect string value: '\xE5\xB9\xB43\xE6\x9C...' for column 'reg_time' at row 1的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!