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个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问