mysql数据库配置

mysql 8 : com.mysql.cj.jdbc.Driver

mysql 5 :com.mysql.jdbc.Driver

useUnicode=true

useSSL=false

characterEncoding=utf8

serverTimezone=Asia/Shanghai(mysql 8)

# DataSource Config
spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/databaseName?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=Asia/Shanghai
    username: root
    password: 123456
posted @ 2021-01-20 14:10  wattmelon  阅读(59)  评论(0编辑  收藏  举报