[add] 增加了备用数据库切换

This commit is contained in:
LYC 2025-04-30 16:55:25 +08:00
parent 96c58948fd
commit a31aa8df17
1 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,32 @@
spring:
application:
name: project-Management
datasource:
master:
jdbc-url: jdbc:mysql://8.130.82.85:33306/WaterManagement?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
# jdbc-url: jdbc:mysql://156.238.251.68:33307/WaterManagement?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
username: root
password: tju1895
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
connection-test-query: SELECT 1
max-lifetime: 30000
slave:
jdbc-url: jdbc:mysql://156.238.251.68:33306/WaterManagement?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
username: root
password: tju1895
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
connection-test-query: SELECT 1
max-lifetime: 30000
jwt:
secret: your_secret_key
expiration: 3600000
server:
port: 8080
logging:
level:
org.springframework.security: DEBUG