本地测试没问题,部署到网站上就出现这样的问题

HTTP Status 500 - Hibernate operation: could not insert: [dd.po.User]; uncategorized SQLException for SQL [insert into user (NICKNAME, USERID, PASSWORD, HEAD_PIC, SEX, BIRTHDAY, PROVINCE, CITY, COUNTY, FANS, FOCUS) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; SQL state [HY000]; error code [1366]; Incorrect string value: '\xB3\xA4\xB4\xF3\xC8\xCB' for column 'NICKNAME' at row 1; nested exception is java.sql.SQLException: Incorrect string value: '\xB3\xA4\xB4\xF3\xC8\xCB' for column 'NICKNAME' at row 1

数据库编码格式的问题,插入的String是UTF-8编码

数据库的编码格式是utf-8啊

编码格式不同造成的,选择一处修正编码