遇到的問題:
問題:Cannot create PoolableConnectionFactory (The server time zone value '?��???????' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.)
解決方案:
出現這個問題的原因是時間無法識別,只需要在連接mysql的url後添加:?serverTimezone=UTC即可
如:jdbc:mysql://localhost:3306/test?serverTimezone=UTC #在數據庫地址後邊添加
問題:發起HTTP請求調用接口,接口內容是插入數據到數據庫,數據中包含中文,插入到數據庫後數據變成了??
解決方案:請求配置中添加utf-8