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