spring框架中配置mysql8.0需要注意的地方(转载)

8.0以后的mysql很强大,但是配置写法出现了不同

装载自https://blog.csdn.net/sunshunli/article/details/104360356

spring中xml配置文件写法:

<property name="driverClassName" value="com.mysql.cj.jdbc.Driver"></property>
<property name="url" value="jdbc:mysql://localhost:3306/数据库名称?characterEncoding=utf8&useSSL=true&serverTimezone=GMT%2B8"></property>

  

new 对象

jdbc:mysql://localhost:3306/数据库名称?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=false

  

猜你喜欢

转载自www.cnblogs.com/xiaojiluben/p/13179282.html