文章詳情頁
java - mysql的collation混用問題如何解決;
瀏覽:110日期:2022-06-11 15:53:15
問題描述
我使用Spring JPA對數(shù)據(jù)庫mysql進(jìn)行操作,一開始創(chuàng)建數(shù)據(jù)庫時已經(jīng)設(shè)定default-character-set=utf8mb4default-collation=utf8mb4_general_ci但是運(yùn)行之后仍然報(bào)錯:java.sql.SQLException: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ’=’
問題解答
回答1:客戶端數(shù)據(jù)庫連接串配置了沒有?
jdbc.url=jdbc:mysql://localhost/test?characterEncoding=utf8mb4
相關(guān)文章:
1. html5 - 最近在自學(xué)react 求一個react表單提交的例子2. javascript - jq 上傳圖片成功后添加一個新的上傳框時出現(xiàn)問題3. angular.js - 在終端中用yeoman啟用angular-generator報(bào)錯,求解?4. 老師您好!我有一個問題、5. 請問寫好python模塊以后,文檔怎么寫?6. javascript - 原生JS和jQuety關(guān)于設(shè)置圖片輪播定時器問題7. laravel5.8 前臺auth 登錄 不了8. jquery清除input type為password?9. 未定義數(shù)組索引: period,求大神指點(diǎn)10. javascript - 微信內(nèi)置瀏覽器的ua是多少?
排行榜

熱門標(biāo)簽