预发环境出现一个问题,
2019-09-17 18:39:00.760 [mro: a2ec1605f7f56edd][http-nio-8002-exec-2] ERROR com.runlion.sat.tools.handler.ExceptionHandler - >>>>>>>>> 全局异常 Incorrect string value: '\xE9\x98\xBF\xE9\x81\x93...' for column 'special_line' at row 1 >>>>>>>>>>>>>>
org.springframework.jdbc.UncategorizedSQLException:
### Error updating database. Cause: java.sql.SQLException: Incorrect string value: '\xE9\x98\xBF\xE9\x81\x93...' for column 'special_line' at row 1
### The error may involve com.runlion.sat.wms.mapper.SendOrderMainMapper.insertSelective-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO send_order_main ( id,owner_id,order_no,oms_no,oms_order_id,customer_no,send_time,order_date,receiver_party,receiver,receiver_phone,receiver_adress_province_id,receiver_adress_city_id,receiver_adress_area_id,receiver_adress,source,delivery_type,business_type,carrier_id,carrier,warehouse_id,state,remarks,create_user,gmt_create,deleted,assign_special_line,special_line,special_phone,special_province_id,special_city_id,special_area_id,special_address ) VALUES( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? )
### Cause: java.sql.SQLException: Incorrect string value: '\xE9\x98\xBF\xE9\x81\x93...' for column 'special_line' at row 1
; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1366]; Incorrect string value: '\xE9\x98\xBF\xE9\x81\x93...' for column 'special_line' at row 1; nested exception is java.sql.SQLException: Incorrect string value: '\xE9\x98\xBF\xE9\x81\x93...' for column 'special_line' at row 1
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:84)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
at com.sun.proxy.$Proxy115.insert(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:278)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:57)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
at com.sun.proxy.$Proxy153.insertSelective(Unknown Source)
数据库表send_order_main
字段special_address
字符集:latin1
排序规则:latin1_swedish_ci
改成字符集:utf8mb4
排序规则:utf8mb4_bin
正确。