2024-07-28 03:13:27 +08:00
|
|
|
server:
|
|
|
|
port: 8800
|
|
|
|
|
|
|
|
spring:
|
|
|
|
profiles:
|
|
|
|
active: @profiles.active@
|
|
|
|
application:
|
|
|
|
name: bunny-service
|
|
|
|
datasource:
|
2024-07-28 18:29:50 +08:00
|
|
|
type: com.zaxxer.hikari.HikariDataSource
|
|
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
|
url: jdbc:mysql://${bunny.master.host}:${bunny.master.port}/${bunny.master.sqlData}?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true
|
|
|
|
username: ${bunny.master.username}
|
|
|
|
password: ${bunny.master.password}
|
|
|
|
shardingsphere:
|
|
|
|
mode:
|
|
|
|
type: Memory
|
|
|
|
datasource:
|
|
|
|
names: master,slave1,slave2
|
|
|
|
master:
|
|
|
|
type: com.zaxxer.hikari.HikariDataSource
|
|
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
|
jdbc-url: jdbc:mysql://${bunny.master.host}:${bunny.master.port}/${bunny.master.sqlData}?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true
|
|
|
|
username: ${bunny.master.username}
|
|
|
|
password: ${bunny.master.password}
|
|
|
|
slave1:
|
|
|
|
type: com.zaxxer.hikari.HikariDataSource
|
|
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
|
jdbc-url: jdbc:mysql://${bunny.slave1.host}:${bunny.slave1.port}/${bunny.slave1.sqlData}?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true
|
|
|
|
username: ${bunny.slave1.username}
|
|
|
|
password: ${bunny.slave1.password}
|
|
|
|
slave2:
|
|
|
|
type: com.zaxxer.hikari.HikariDataSource
|
|
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
|
jdbc-url: jdbc:mysql://${bunny.slave2.host}:${bunny.slave2.port}/${bunny.slave2.sqlData}?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true
|
|
|
|
username: ${bunny.slave2.username}
|
|
|
|
password: ${bunny.slave2.password}
|
|
|
|
rules:
|
|
|
|
readwrite-splitting:
|
|
|
|
data-sources:
|
|
|
|
myDS:
|
|
|
|
type: Static
|
|
|
|
props:
|
|
|
|
write-data-source-name: master
|
|
|
|
read-data-source-names: slave1,slave2
|
|
|
|
load-balancers:
|
|
|
|
load-balancer-name: alg_round
|
|
|
|
load-balancers:
|
|
|
|
alg_round:
|
|
|
|
type: ROUND_ROBIN
|
|
|
|
alg_random:
|
|
|
|
type: RANDOM
|
|
|
|
alg_weight:
|
|
|
|
type: WEIGHT
|
|
|
|
props:
|
|
|
|
- slave1: 1
|
|
|
|
- slave2: 2
|
|
|
|
props:
|
|
|
|
sql-show: true
|
2024-07-28 03:13:27 +08:00
|
|
|
data:
|
|
|
|
redis:
|
|
|
|
host: ${bunny.redis.host}
|
|
|
|
port: ${bunny.redis.port}
|
|
|
|
database: ${bunny.redis.database}
|
|
|
|
password: ${bunny.redis.password}
|
|
|
|
lettuce:
|
|
|
|
pool:
|
|
|
|
max-active: 20 #最大连接数
|
|
|
|
max-wait: -1 #最大阻塞等待时间(负数表示没限制)
|
|
|
|
max-idle: 5 #最大空闲
|
|
|
|
min-idle: 0 #最小空闲
|
|
|
|
jackson:
|
|
|
|
date-format: yyyy-MM-dd HH:mm:ss
|
|
|
|
time-zone: GMT+8
|
|
|
|
|
|
|
|
mybatis-plus:
|
|
|
|
mapper-locations: classpath:mapper/*.xml
|
|
|
|
global-config:
|
|
|
|
db-config:
|
|
|
|
logic-delete-field: isDelete
|
|
|
|
configuration:
|
|
|
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志
|
|
|
|
|
|
|
|
logging:
|
|
|
|
level:
|
2024-07-28 18:29:50 +08:00
|
|
|
cn.bunny.service.mapper: info
|
2024-07-28 03:13:27 +08:00
|
|
|
cn.bunny.service.controller: info
|
|
|
|
cn.bunny.service.service: info
|
2024-07-28 18:29:50 +08:00
|
|
|
root: info
|
2024-07-28 03:13:27 +08:00
|
|
|
pattern:
|
|
|
|
dateformat: HH:mm:ss:SSS
|
|
|
|
file:
|
|
|
|
path: "logs/${spring.application.name}"
|
|
|
|
|