问题描述
- 本地测试没问题,部署到网站上就出现这样的问题
-
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: 'xB3xA4xB4xF3xC8xCB' for column 'NICKNAME' at row 1; nested exception is java.sql.SQLException: Incorrect string value: 'xB3xA4xB4xF3xC8xCB' for column 'NICKNAME' at row 1
解决方案
数据库编码格式的问题,插入的String是UTF-8编码
解决方案二:
数据库的编码格式是utf-8啊
解决方案三:
编码格式不同造成的,选择一处修正编码
时间: 2024-09-15 18:49:00