驱动版本:mysql-connector-java-8.0.12
8.0之前(网上有说6.0.2版本之后改的)
com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/test?characterEncoding=utf8
8.0及以后(或者说6.0.2版本之后?)
com.mysql.cj.jdbc.Driver
这里的url是直接写在xml配置文件里的
jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8