标签:version org start cat com 参考 star log root
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.14</version>
</dependency>
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.url=jdbc:mysql://localhost:3306/JdbcDemo?serverTimezone=UTC
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
1、Spring-Boot默认使用tomcat的DataSource。
1、首先把druid的依赖添加进项目。
2、配置文件中指定数据源的类型spring.datasource.type=DruidDataSourcce
3、参考:https://blog.csdn.net/Code_shadow/article/details/81164394
标签:version org start cat com 参考 star log root
原文地址:https://www.cnblogs.com/feiqiangsheng/p/12540276.html