警告: Could not load driverClass com.mysql.cj.jdbc.Driver
解決辦法:檢查每個配置值最后是否有空格,把鼠標放在配置值最后,如果前面有空格,去掉即可。
前面無空格,如下圖所示:
此外:以上在properties中的配置寫法是:
jdbcurl=jdbc:mysql://localhost/sys?useUnicode=true&characterEncoding=utf-8&useSSL=FALSE&serverTimezone = UTC
而在xml文件中配置寫法(需要轉義-&,並用分號隔開)是:
jdbc:mysql://localhost/sys?useUnicode=true&characterEncoding=utf-8&useSSL=FALSE&
serverTimezone=UTC