Change data source to hikari

This commit is contained in:
2023-10-30 00:22:44 +08:00
parent 11ceb410c8
commit 1d74afd5cb
3 changed files with 10 additions and 15 deletions

View File

@@ -125,11 +125,6 @@
<version>3.5.3.2</version> <version>3.5.3.2</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.2.19</version>
</dependency>
<!-- <!--
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>

View File

@@ -17,16 +17,16 @@ spring:
url: jdbc:mysql://localhost # MySQL url url: jdbc:mysql://localhost # MySQL url
username: root # MySQL username username: root # MySQL username
password: root # MySQL password password: root # MySQL password
hikari:
# pool-name: HikariCP # Connection pool name
# minimum-idle: 5 # Minimum number of connection in pool
# idle-timeout: 600000 # The lifetime of connection when idle
# maximum-pool-size: 10 # Maximum number of connection in pool
# auto-commit: true # Auto commit
# max-lifetime: 1800000 # Maximum lifetime of connection
# connection-timeout: 30000 # Connection timeout
# connection-test-query: select 1 # Test query then connect
druid:
# initial-size: 20 # Initial number of connections
# min-idle: 20 # Minimum number of connection pools
# max-active: 20 # Maximum number of connection pools
# max-wait: 3000 # Maximum connection timeout
# min-evictable-idle-time-millis: 300000 # Minimum time for a connection to live in the pool
# max-evictable-idle-time-millis: 900000 # Maximum time for a connection to live in the pool
# break-after-acquire-failure: true # Terminate the retry when the server fails to reconnect for the specified number of times
# connection-error-retry-attempts: 5 # Number of failed reconnections
data: data:
redis: redis:

View File

@@ -6,7 +6,7 @@ spring:
profiles: profiles:
active: config active: config
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
jackson: jackson:
date-format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z' date-format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'