From 6bf38a806cde9df250ff7bb4dced4cbb8af0a205 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期二, 13 七月 2021 13:11:37 +0800 Subject: [PATCH] fix 修复 docker业务集群部署与文件上传的问题 --- ruoyi-admin/src/main/resources/application-dev.yml | 63 ++++++++++++++++++++++++------- 1 files changed, 49 insertions(+), 14 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml index 71e5b6f..62312f6 100644 --- a/ruoyi-admin/src/main/resources/application-dev.yml +++ b/ruoyi-admin/src/main/resources/application-dev.yml @@ -1,21 +1,27 @@ # 鏁版嵁婧愰厤缃� spring: + autoconfigure: + exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure datasource: type: com.alibaba.druid.pool.DruidDataSource - driverClassName: com.mysql.cj.jdbc.Driver + # 鍔ㄦ�佹暟鎹簮鏂囨。 https://www.kancloud.cn/tracy5546/dynamic-datasource/content + dynamic: + #璁剧疆榛樿鐨勬暟鎹簮鎴栬�呮暟鎹簮缁�,榛樿鍊煎嵆涓� master + primary: master + datasource: + # 涓诲簱鏁版嵁婧� + master: + driverClassName: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true + username: root + password: root + # 浠庡簱鏁版嵁婧� + slave: + driverClassName: com.mysql.cj.jdbc.Driver + url: + username: + password: druid: - # 涓诲簱鏁版嵁婧� - master: - url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true - username: root - password: root - # 浠庡簱鏁版嵁婧� - slave: - # 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴 - enabled: false - url: - username: - password: # 鍒濆杩炴帴鏁� initialSize: 5 # 鏈�灏忚繛鎺ユ睜鏁伴噺 @@ -35,6 +41,8 @@ testWhileIdle: true testOnBorrow: false testOnReturn: false + # 娉ㄦ剰杩欎釜鍊煎拰druid鍘熺敓涓嶄竴鑷达紝榛樿鍚姩浜唖tat + filters: stat webStatFilter: enabled: true statViewServlet: @@ -81,7 +89,7 @@ # 鍗曡妭鐐归厤缃� singleServerConfig: # 瀹㈡埛绔悕绉� - clientName: ${ruoyi-vue-plus.name} + clientName: ${ruoyi.name} # 鏈�灏忕┖闂茶繛鎺ユ暟 connectionMinimumIdleSize: 32 # 杩炴帴姹犲ぇ灏� @@ -102,3 +110,30 @@ subscriptionsPerConnection: 5 # DNS鐩戞祴鏃堕棿闂撮殧锛屽崟浣嶏細姣 dnsMonitoringInterval: 5000 + +--- # 鐩戞帶閰嶇疆 +spring: + boot: + admin: + # Spring Boot Admin Client 瀹㈡埛绔殑鐩稿叧閰嶇疆 + client: + # 璁剧疆 Spring Boot Admin Server 鍦板潃 + url: http://localhost:9090/admin + instance: + prefer-ip: true # 娉ㄥ唽瀹炰緥鏃讹紝浼樺厛浣跨敤 IP + username: ruoyi + password: 123456 + +# Actuator 鐩戞帶绔偣鐨勯厤缃」 +management: + endpoints: + web: + # Actuator 鎻愪緵鐨� API 鎺ュ彛鐨勬牴鐩綍銆傞粯璁や负 /actuator + base-path: /actuator + exposure: + # 闇�瑕佸紑鏀剧殑绔偣銆傞粯璁ゅ�煎彧鎵撳紑 health 鍜� info 涓や釜绔偣銆傞�氳繃璁剧疆 * 锛屽彲浠ュ紑鏀炬墍鏈夌鐐广�� + # 鐢熶骇鐜涓嶅缓璁斁寮�鎵�鏈� 鏍规嵁椤圭洰闇�姹傛斁寮�鍗冲彲 + include: '*' + endpoint: + logfile: + external-file: ./logs/sys-console.log -- Gitblit v1.9.3