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
网友评论