Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
838bddcc
Commit
838bddcc
authored
Apr 11, 2024
by
liuzeheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据库切换
parent
c5cf65cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
application-dev.yaml
yudao-server/src/main/resources/application-dev.yaml
+11
-11
No files found.
yudao-server/src/main/resources/application-dev.yaml
View file @
838bddcc
...
...
@@ -33,7 +33,7 @@ spring:
druid
:
# Druid 【连接池】相关的全局配置
initial-size
:
5
# 初始连接数
min-idle
:
10
# 最小连接池数量
max-active
:
2
0
# 最大连接池数量
max-active
:
5
0
# 最大连接池数量
max-wait
:
600000
# 配置获取连接等待超时的时间,单位:毫秒
time-between-eviction-runs-millis
:
60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
min-evictable-idle-time-millis
:
300000
# 配置一个连接在池中最小生存的时间,单位:毫秒
...
...
@@ -46,31 +46,31 @@ spring:
datasource
:
master
:
name
:
jiedao
url
:
jdbc:mysql://1
59.75.224.138:2290
/${spring.datasource.dynamic.datasource.master.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE
url
:
jdbc:mysql://1
10.41.143.128:3306
/${spring.datasource.dynamic.datasource.master.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE
driver-class-name
:
com.mysql.cj.jdbc.Driver
username
:
root
password
:
mysql@202
2
password
:
mysql@202
4
slave
:
# 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
name
:
jiedao
url
:
jdbc:mysql://1
59.75.224.138:2290
/${spring.datasource.dynamic.datasource.slave.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE
url
:
jdbc:mysql://1
10.41.143.128:3306
/${spring.datasource.dynamic.datasource.slave.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE
driver-class-name
:
com.mysql.cj.jdbc.Driver
username
:
root
password
:
mysql@202
2
password
:
mysql@202
4
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
redis
:
host
:
1
59.75.224.13
8
# 地址
port
:
2291
# 端口
host
:
1
10.41.143.12
8
# 地址
port
:
6379
# 端口
database
:
0
# 数据库索引
password
:
redis@2022
password
:
123456
timeout
:
60s
connect-timeout
:
60s
redis-limiter
:
redis-host
:
1
59.75.224.13
8
# redis server IP 默认值:127.0.0.1
redis-port
:
2291
# redis service 端口 默认值:6379
redis-host
:
1
10.41.143.12
8
# redis server IP 默认值:127.0.0.1
redis-port
:
6379
# redis service 端口 默认值:6379
redis-db
:
4
# redis service 数据库 默认值:6379
redis-password
:
redis@2022
# redis 访问密码 默认值:null
redis-password
:
123456
# redis 访问密码 默认值:null
redis-connection-timeout
:
2000
# redis 连接超时时间 默认值:2000
redis-pool-max-idle
:
50
# redis 连接池最大空闲连接数 默认值:50
redis-pool-min-idle
:
10
# redis 连接池最小空闲连接数 默认值: 10
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment