使用第三方数据连接池(druid)

Exisi 2022-09-28 15:43:07
Categories: Tags:

<dependency>

  <groupId>com.alibaba</groupId>

  <artifactId>druid-spring-boot-starter</artifactId>

  <version>1.2.8</version>

</dependency>

 

示例

spring.datasource.type=com.alibaba.druid.pool.DruidDataSource

示例

spring.datasource.druid.driver-class-name=com.mysql.cj.jdbc.Driver

spring.datasource.druid.url=jdbc:mysql://localhost:3306/mydatabase?serverTimezone=UTC

spring.datasource.druid.username=root

spring.datasource.druid.password=123456