SpringBoot-Application-数据库配置模板
这里以MySQL数据库为例
application.yml
spring:
datasource:
username: root
password: 123456
url: jdbc:mysql://localhost:3306/university_work?serverTimezone=GMT%2B8&useSSL=false&useUnicode=true&charcterEncoding=UTF-8
driver-class-name: com.mysql.cj.jdbc.Driver
application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/university_work?serverTimezone=GMT%2B8&useSSL=false&useUnicode=true&charcterEncoding=UTF-8
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver