springboot application.properties 配置 mysql5 和 mysql8配置区别

MySQL5

spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/db_name?useSSL=false
spring.datasource.username=root
spring.datasource.password=password

MySQL8 以上(springboot 2.1)
springboot 2.1 集成了8 以上的驱动

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/db_name?useSSL=false&serverTimeZone=GMT%2B8
spring.datasource.username=root
spring.datasource.password=password

你可能感兴趣的:(springboot application.properties 配置 mysql5 和 mysql8配置区别)