我使用Spring JPA對資料庫mysql進行操作,一開始建立資料庫時已經設定
default-character-set=utf8mb4
default-collation=utf8mb4_general_ci
但是運行之後仍然會報錯:
java.sql.SQLException: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
曾经蜡笔没有小新2017-06-06 09:54:28
客戶端資料庫連接串配置了沒有?
jdbc.url=jdbc:mysql://localhost/test?characterEncoding=utf8mb4