提交配置文件

This commit is contained in:
wuweihua
2026-09-24 15:38:50 +08:00
parent a9aa77f5ea
commit 7e54dbff95
4 changed files with 103 additions and 8 deletions
@@ -1,3 +1,16 @@
# 本地配置(默认生效)
# 启动:不传 profile,或 --spring.profiles.active=local
# Elasticsearch:本机 Docker http://127.0.0.1:9200
# 数据源暂与线上相同,换本地库时只改本文件
bms:
elasticsearch:
enabled: true
uris: http://127.0.0.1:9200
username:
password:
index: bms_biz_log
# 数据源配置
spring:
datasource:
@@ -0,0 +1,87 @@
# 线上配置
# 启动:--spring.profiles.active=prod
# Elasticsearch:172.19.64.13:9200
logging:
level:
com.ruoyi: info
org.springframework: warn
bms:
elasticsearch:
enabled: true
uris: https://172.19.64.13:9200
username: elastic
password: d4aoZYB2yQHXmWZiH6Gw
index: bms_biz_log
# 数据源配置
spring:
devtools:
restart:
enabled: false
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
druid:
# 主库数据源
master:
url: jdbc:mysql://47.106.220.100:3307/bms?useUnicode=true&characterEncoding=utf8&connectionCollation=utf8mb4_unicode_ci&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username: bms
password: D3wsHf2ZMfFtWtKX
connectionInitSqls: SET NAMES utf8mb4
# Slave DS: Oracle upstream order (TAB_ORDER)
slave:
enabled: true
driverClassName: oracle.jdbc.OracleDriver
url: jdbc:oracle:thin:@//120.79.189.203:15281/WSDB
username: readonly_report
password: k5x15WP1hE
# Oracle remote query may need longer read timeout than MySQL
connectTimeout: 30000
socketTimeout: 120000
validationQuery: SELECT 1 FROM DUAL
# 初始连接数
initialSize: 5
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置连接超时时间
connectTimeout: 30000
# 配置网络超时时间
socketTimeout: 60000
# 配置间隔多久检测一次空闲连接,避免远程数据库断开后连接池继续复用失效连接,单位是毫秒
timeBetweenEvictionRunsMillis: 30000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
# 异步账单任务借用连接时校验连接有效性,避免拿到已被数据库断开的连接
testOnBorrow: true
testOnReturn: false
webStatFilter:
enabled: true
statViewServlet:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username: ruoyi
login-password: 123456
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
@@ -55,7 +55,8 @@ spring:
# 国际化资源文件路径
basename: i18n/messages
profiles:
active: druid
# local -> application-local.yml ; prod -> application-prod.yml
active: local
# 文件上传
servlet:
multipart:
@@ -169,9 +170,3 @@ bms:
order-table: WEISHI_USER.TAB_ORDER
# Fallback product when Oracle row has no PRODUCT_CODE
default-product-code: ""
elasticsearch:
enabled: true
uris: https://172.19.64.13:9200
username: elastic
password: d4aoZYB2yQHXmWZiH6Gw
index: bms_biz_log
+1 -1
View File
@@ -26,7 +26,7 @@ function start()
if [ x"$PID" != x"" ]; then
echo "$AppName is running..."
else
nohup java $JVM_OPTS -jar $AppName > /dev/null 2>&1 &
nohup java $JVM_OPTS -jar $AppName --spring.profiles.active=prod > /dev/null 2>&1 &
echo "Start $AppName success..."
fi
}