xuexixuexi7001
2020-01-08 19:07
采纳率: 28.6%
浏览 539
已采纳

mybatis中文插入数据库报错

mybatis中文插入数据库报错,网上的方法都试过了,都没用。
跪求大神
报错信息:

Error updating database. Cause: java.sql.SQLException: Incorrect string value: '\xE6\x96\xB9\xE6\xB3\x95' for column 'username' at row 1

The error may exist in file [E:\JavaProject\project\MangoAndPork\target\classes\mapper\UserMapper.xml]

The error may involve com.example.demo.mapper.UserMapper.Register-Inline

The error occurred while setting parameters

SQL: insert into user ( username, password, email, phone, createdate ) values ( ?, ?, ?, ?, now() )

Cause: java.sql.SQLException: Incorrect string value: '\xE6\x96\xB9\xE6\xB3\x95' for column 'username' at row 1

; uncategorized SQLException; SQL state [HY000]; error code [1366]; Incorrect string value: '\xE6\x96\xB9\xE6\xB3\x95' for column 'username' at row 1; nested exception is java.sql.SQLException: Incorrect string value: '\xE6\x96\xB9\xE6\xB3\x95' for column 'username' at row 1] with root cause图片说明图片说明图片说明图片说明

1条回答 默认 最新

相关推荐 更多相似问题