Incorrect string value: '获取...' for column 'result' at row 1

Details of the error message:

### Error updating database.  Cause: java.sql.SQLException: Incorrect string value: '\xE8\x8E\xB7\xE5\x8F\x96...' for column 'result' at row 1
### The error may involve com.blog.springboot.dao.ApiLogDao.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO wp_api_log   ( class_name,  method_name,  params,  `result`,  consume_time,  update_date )  VALUES   ( ?,  ?,  ?,  ?,  ?,  ? )
### Cause: java.sql.SQLException: Incorrect string value: '\xE8\x8E\xB7\xE5\x8F\x96...' for column 'result' at row 1
; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1366]; Incorrect string value: '\xE8\x8E\xB7\xE5\x8F\x96...' for column 'result' at row 1; nested exception is java.sql.SQLException: Incorrect string value: '\xE8\x8E\xB7\xE5\x8F\x96...' for column 'result' at row 1] with root cause

java.sql.SQLException: Incorrect string value: '\xE8\x8E\xB7\xE5\x8F\x96...' for column 'result' at row 1

Error Analysis:
insert the data column, if it is Chinese, then the above error occurs, if it is in English, then an error does not occur.
It is speculated that the field coding column has a relationship, really see table corresponding character encoding are found in latin, and finally changed it to utf8 can be solved.

If you want a permanent solution to this problem, refer to this link: https://www.cnblogs.com/youcong/p/9374498.html
above problems I encountered a long time ago, so it has been recorded at that time resolved Method.

Guess you like

Origin www.cnblogs.com/youcong/p/11707828.html