开启MySQL连接的配置

开启MySQL连接的配置

#完整的url
jdbc:mysql://localhost:3306/test?rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false

#说明
# rewriteBatchedStatements=true : 将数据批量传输给mysql
# useSSL=false :  MySQL在高版本需要指明是否进行SSL连接。
# serverTimezone=Asia/Shanghai : 时区配置
# useUnicode=true&characterEncoding=utf8 :编码

原先的依赖

 <dependency>
     <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <scope>runtime</scope>
  </dependency>

开启批量插入数据的功能在使用mp进行批量插入的时候可以实现很高的插入的性能。

猜你喜欢

转载自blog.csdn.net/weixin_41957626/article/details/132650414