Add multiple datasource
This commit is contained in:
4
pom.xml
4
pom.xml
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>3.2.0</version>
|
<version>3.1.4</version>
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>top.fatweb</groupId>
|
<groupId>top.fatweb</groupId>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
<kotlin.version>1.9.21</kotlin.version>
|
<kotlin.version>1.9.21</kotlin.version>
|
||||||
<build.timestamp>${maven.build.timestamp}</build.timestamp>
|
<build.timestamp>${maven.build.timestamp}</build.timestamp>
|
||||||
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss</maven.build.timestamp.format>
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss</maven.build.timestamp.format>
|
||||||
<flyway.version>10.2.0</flyway.version>
|
<flyway.version>9.22.3</flyway.version>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -19,9 +19,12 @@ server:
|
|||||||
|
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://localhost # MySQL url
|
dynamic:
|
||||||
username: root # MySQL username
|
datasource:
|
||||||
password: root # MySQL password
|
master:
|
||||||
|
url: jdbc:mysql://localhost # MySQL url
|
||||||
|
username: root # MySQL username
|
||||||
|
password: root # MySQL password
|
||||||
hikari:
|
hikari:
|
||||||
# pool-name: HikariCP # Connection pool name
|
# pool-name: HikariCP # Connection pool name
|
||||||
# minimum-idle: 5 # Minimum number of connection in pool
|
# minimum-idle: 5 # Minimum number of connection in pool
|
||||||
|
|||||||
@@ -7,8 +7,19 @@ spring:
|
|||||||
profiles:
|
profiles:
|
||||||
active: config
|
active: config
|
||||||
datasource:
|
datasource:
|
||||||
type: com.zaxxer.hikari.HikariDataSource
|
dynamic:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
primary: master
|
||||||
|
strict: false
|
||||||
|
datasource:
|
||||||
|
master:
|
||||||
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
local:
|
||||||
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
|
driver-class-name: org.sqlite.JDBC
|
||||||
|
url: jdbc:sqlite::resource:db/sqlite.db
|
||||||
|
|
||||||
|
|
||||||
jackson:
|
jackson:
|
||||||
date-format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
|
date-format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
|
||||||
time-zone: GMT
|
time-zone: GMT
|
||||||
|
|||||||
0
src/main/resources/db/sqlite.db
Normal file
0
src/main/resources/db/sqlite.db
Normal file
Reference in New Issue
Block a user