springboot中mysql连接配置
作者:互联网
1.properties格式
# 数据库配置mysql5
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.username=
spring.datasource.password=
spring.datasource.url=jdbc:mysql://localhost:3306/dbName?useSSL=false&useUnicode=true&characterEncoding=utf-8
2.yml格式
# 数据库配置mysql8
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/za?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
username:
password:
3.其他
标签:jdbc,false,springboot,spring,useSSL,datasource,mysql,连接 来源: https://www.cnblogs.com/yang37/p/15797827.html