我在sql中使用了 case when 來 顯示狀態 但是 我在頁面顯示的時候 出現 ????亂碼 情況出現
解決方案:
在 配置文件中修改 sql的編碼格式 此編碼 格式 是返回時候 對應 sql語句上的編碼方式
更改爲 utf-8
spring.datasource.url=jdbc:mysql://localhost/tm_xsdb?useSSL=false&serverTimezone=UTC&characterEncoding=UTF-8
我在sql中使用了 case when 來 顯示狀態 但是 我在頁面顯示的時候 出現 ????亂碼 情況出現
解決方案:
在 配置文件中修改 sql的編碼格式 此編碼 格式 是返回時候 對應 sql語句上的編碼方式
更改爲 utf-8
spring.datasource.url=jdbc:mysql://localhost/tm_xsdb?useSSL=false&serverTimezone=UTC&characterEncoding=UTF-8