From 35361d2bea78409f17fa6fa382eec9e33c3840b5 Mon Sep 17 00:00:00 2001 From: liriming <1343021927@qq.com> Date: 星期一, 10 三月 2025 15:12:08 +0800 Subject: [PATCH] 配置文件 --- ansteel-biz/src/main/java/com/iailab/module/ansteel/job/task/RestartIailabModelServiceTask.java | 2 ansteel-biz/src/main/resources/application-prod.yaml | 73 ++++++++++++++++++++++++++++++++++++ ansteel-biz/src/main/resources/application.yaml | 2 3 files changed, 75 insertions(+), 2 deletions(-) diff --git a/ansteel-biz/src/main/java/com/iailab/module/ansteel/job/task/RestartIailabModelServiceTask.java b/ansteel-biz/src/main/java/com/iailab/module/ansteel/job/task/RestartIailabModelServiceTask.java index dfcccdd..7cb9ef1 100644 --- a/ansteel-biz/src/main/java/com/iailab/module/ansteel/job/task/RestartIailabModelServiceTask.java +++ b/ansteel-biz/src/main/java/com/iailab/module/ansteel/job/task/RestartIailabModelServiceTask.java @@ -24,7 +24,7 @@ public void run(String params) { logger.info("RestartIailabModelServiceTask定时任务正在执行,参数为:{}", params); try { - String command = "cmd /c start D:\\iailab\\RestartIailabModelService.bat"; + String command = "cmd /c start D:\\iailab\\webapps\\model\\RestartIailabModelService.bat"; Process process = Runtime.getRuntime().exec(command); BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); String line; diff --git a/ansteel-biz/src/main/resources/application-prod.yaml b/ansteel-biz/src/main/resources/application-prod.yaml new file mode 100644 index 0000000..b72949e --- /dev/null +++ b/ansteel-biz/src/main/resources/application-prod.yaml @@ -0,0 +1,73 @@ +--- #################### 数据库相关配置 #################### +spring: + datasource: + druid: # Druid 【监控】相关的全局配置 + web-stat-filter: + enabled: true + stat-view-servlet: + enabled: true + allow: # 设置白名单,不填则允许所有访问 + url-pattern: /druid/* + login-username: # 控制台管理用户名和密码 + login-password: + filter: + stat: + enabled: true + log-slow-sql: true # 慢 SQL 记录 + slow-sql-millis: 100 + merge-sql: true + wall: + config: + multi-statement-allow: true + dynamic: # 多数据源配置 + druid: # Druid 【连接池】相关的全局配置 + initial-size: 1 # 初始连接数 + min-idle: 1 # 最小连接池数量 + max-active: 20 # 最大连接池数量 + max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 + time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 + min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 + max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 + validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 + test-while-idle: true + test-on-borrow: false + test-on-return: false + primary: master + datasource: + master: + url: jdbc:mysql://10.50.37.62:3306/iailab_expert_tenant_ansteel?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + username: root + password: 123456 + slave: # 模拟从库,可根据自己需要修改 + lazy: true # 开启懒加载,保证启动速度 + url: jdbc:mysql://127.0.0.1:3306/iailab_expert_tenant_ansteel?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true + username: root + password: 123456 + + # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 + redis: + host: 10.50.37.62 # 地址 + port: 6379 # 端口 + database: 10 # 数据库索引 + password: 123456 # 密码,建议生产环境开启 + +--- #################### 平台相关配置 #################### + +# 平台配置项,设置当前项目所有自定义的配置 +iailab: + env: # 多环境的配置项 + tag: ${HOSTNAME} + captcha: + enable: false # 本地环境,暂时关闭图片验证码,方便登录等接口的测试 + security: + mock-enable: true + access-log: # 访问日志的配置项 + enable: false + token: + base-url: http://10.50.37.62:48080/admin-api/system + tenant-id: 176 + client-id: ansteel + client-secret: ansteel111111111111111 + username: ansteel + password: 123456 + diff --git a/ansteel-biz/src/main/resources/application.yaml b/ansteel-biz/src/main/resources/application.yaml index 39621c8..9d45e52 100644 --- a/ansteel-biz/src/main/resources/application.yaml +++ b/ansteel-biz/src/main/resources/application.yaml @@ -4,7 +4,7 @@ name: ansteel-server profiles: - active: dev + active: prod cloud: nacos: -- Gitblit v1.9.3