Commit e896f22a36f22cb3d0c02d45a51dc610b059696d
1 parent
d90d176c
升级Spring Cloud Alibaba 2021.0.1.0,使用 spring.config.import 方式引入nacos配置
Showing
4 changed files
with
75 additions
and
104 deletions
jeecg-boot/jeecg-cloud-module/jeecg-cloud-nacos/docs/config/jeecg-dev.yaml
... | ... | @@ -9,56 +9,32 @@ spring: |
9 | 9 | web-stat-filter: |
10 | 10 | enabled: true |
11 | 11 | dynamic: |
12 | - druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置) | |
13 | - # 连接池的配置信息 | |
14 | - # 初始化大小,最小,最大 | |
12 | + druid: | |
15 | 13 | initial-size: 5 |
16 | 14 | min-idle: 5 |
17 | 15 | maxActive: 20 |
18 | - # 配置获取连接等待超时的时间 | |
19 | 16 | maxWait: 60000 |
20 | - # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 | |
21 | 17 | timeBetweenEvictionRunsMillis: 60000 |
22 | - # 配置一个连接在池中最小生存的时间,单位是毫秒 | |
23 | 18 | minEvictableIdleTimeMillis: 300000 |
24 | 19 | validationQuery: SELECT 1 FROM DUAL |
25 | 20 | testWhileIdle: true |
26 | 21 | testOnBorrow: false |
27 | 22 | testOnReturn: false |
28 | - # 打开PSCache,并且指定每个连接上PSCache的大小 | |
29 | 23 | poolPreparedStatements: true |
30 | 24 | maxPoolPreparedStatementPerConnectionSize: 20 |
31 | - # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 | |
32 | 25 | filters: stat,wall,slf4j |
33 | - # 通过connectProperties属性来打开mergeSql功能;慢SQL记录 | |
34 | 26 | connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 |
35 | - | |
36 | 27 | datasource: |
37 | 28 | master: |
38 | 29 | url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai |
39 | 30 | username: root |
40 | 31 | password: root |
41 | 32 | driver-class-name: com.mysql.cj.jdbc.Driver |
42 | - # 多数据源配置 | |
43 | - #multi-datasource1: | |
44 | - #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai | |
45 | - #username: root | |
46 | - #password: root | |
47 | - #driver-class-name: com.mysql.cj.jdbc.Driver | |
48 | - #redis 配置 | |
49 | 33 | redis: |
50 | 34 | database: 0 |
51 | 35 | host: jeecg-boot-redis |
52 | - lettuce: | |
53 | - pool: | |
54 | - max-active: 8 #最大连接数据库连接数,设 0 为没有限制 | |
55 | - max-idle: 8 #最大等待连接中的数量,设 0 为没有限制 | |
56 | - max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。 | |
57 | - min-idle: 0 #最小等待连接中的数量,设 0 为没有限制 | |
58 | - shutdown-timeout: 100ms | |
59 | 36 | password: |
60 | 37 | port: 6379 |
61 | - #rabbitmq配置 | |
62 | 38 | rabbitmq: |
63 | 39 | host: jeecg-boot-rabbitmq |
64 | 40 | username: guest |
... | ... | @@ -70,74 +46,48 @@ spring: |
70 | 46 | listener: |
71 | 47 | simple: |
72 | 48 | acknowledge-mode: manual |
73 | - #消费者的最小数量 | |
74 | 49 | concurrency: 1 |
75 | - #消费者的最大数量 | |
76 | 50 | max-concurrency: 1 |
77 | - #是否支持重试 | |
78 | 51 | retry: |
79 | 52 | enabled: true |
80 | -#jeecg专用配置 | |
81 | -minidao : | |
82 | - base-package: org.jeecg.modules.jmreport.* | |
83 | -jeecg : | |
84 | - # 签名密钥串(前后端要一致,正式发布请自行修改) | |
53 | +minidao: | |
54 | + base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.* | |
55 | +jeecg: | |
85 | 56 | signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a |
86 | - # 本地:local\Minio:minio\阿里云:alioss | |
57 | + signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys | |
87 | 58 | uploadType: local |
88 | - #前端访问地址 | |
89 | 59 | domainUrl: |
90 | 60 | pc: http://localhost:3100 |
91 | 61 | app: http://localhost:8051 |
92 | - path : | |
93 | - #文件上传根目录 设置 | |
62 | + path: | |
94 | 63 | upload: /opt/upFiles |
95 | - #webapp文件路径 | |
96 | 64 | webapp: /opt/webapp |
97 | 65 | shiro: |
98 | 66 | excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/** |
99 | - #阿里云oss存储配置 | |
100 | 67 | oss: |
101 | 68 | endpoint: oss-cn-beijing.aliyuncs.com |
102 | 69 | accessKey: ?? |
103 | 70 | secretKey: ?? |
104 | 71 | bucketName: jeecgdev |
105 | 72 | staticDomain: ?? |
106 | - # ElasticSearch 6设置 | |
107 | 73 | elasticsearch: |
108 | 74 | cluster-name: jeecg-ES |
109 | - cluster-nodes: 127.0.0.1:9200 | |
75 | + cluster-nodes: jeecg-boot-es:9200 | |
110 | 76 | check-enabled: false |
111 | - # 表单设计器配置 | |
112 | - desform: | |
113 | - # 主题颜色(仅支持 16进制颜色代码) | |
114 | - theme-color: "#1890ff" | |
115 | - # 文件、图片上传方式,可选项:qiniu(七牛云)、system(跟随系统配置) | |
116 | - upload-type: system | |
117 | - map: | |
118 | - # 配置百度地图的AK,申请地址:https://lbs.baidu.com/apiconsole/key?application=key#/home | |
119 | - baidu: ?? | |
120 | - # 在线预览文件服务器地址配置 | |
121 | 77 | file-view-domain: 127.0.0.1:8012 |
122 | - # minio文件上传 | |
123 | 78 | minio: |
124 | 79 | minio_url: http://minio.jeecg.com |
125 | 80 | minio_name: ?? |
126 | 81 | minio_pass: ?? |
127 | 82 | bucketName: otatest |
128 | - #大屏报表参数设置 | |
129 | 83 | jmreport: |
130 | 84 | mode: dev |
131 | - #是否需要校验token | |
132 | 85 | is_verify_token: false |
133 | - #必须校验方法 | |
134 | 86 | verify_methods: remove,delete,save,add,update |
135 | - #Wps在线文档 | |
136 | 87 | wps: |
137 | 88 | domain: https://wwo.wps.cn/office/ |
138 | 89 | appid: ?? |
139 | 90 | appsecret: ?? |
140 | - #xxl-job配置 | |
141 | 91 | xxljob: |
142 | 92 | enabled: false |
143 | 93 | adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin |
... | ... | @@ -145,35 +95,22 @@ jeecg : |
145 | 95 | accessToken: '' |
146 | 96 | logPath: logs/jeecg/job/jobhandler/ |
147 | 97 | logRetentionDays: 30 |
148 | - #自定义路由配置 yml nacos database | |
149 | - route: | |
150 | - config: | |
151 | - data-id: jeecg-gateway-router | |
152 | - group: DEFAULT_GROUP | |
153 | - data-type: database | |
154 | - #分布式锁配置 | |
155 | 98 | redisson: |
156 | 99 | address: jeecg-boot-redis:6379 |
157 | 100 | password: |
158 | 101 | type: STANDALONE |
159 | 102 | enabled: true |
160 | -#Mybatis输出sql日志 | |
161 | 103 | logging: |
162 | 104 | level: |
163 | 105 | org.jeecg.modules.system.mapper : info |
164 | -#cas单点登录 | |
165 | 106 | cas: |
166 | 107 | prefixUrl: http://localhost:8888/cas |
167 | -#swagger | |
168 | 108 | knife4j: |
169 | - #开启生产环境屏蔽 | |
170 | 109 | production: false |
171 | 110 | basic: |
172 | 111 | enable: false |
173 | 112 | username: jeecg |
174 | 113 | password: jeecg1314 |
175 | - | |
176 | -#第三方登录 | |
177 | 114 | justauth: |
178 | 115 | enabled: true |
179 | 116 | type: |
... | ... | @@ -194,25 +131,16 @@ justauth: |
194 | 131 | type: default |
195 | 132 | prefix: 'demo::' |
196 | 133 | timeout: 1h |
197 | -#第三方APP对接 | |
198 | 134 | third-app: |
199 | 135 | enabled: false |
200 | 136 | type: |
201 | - #企业微信 | |
202 | 137 | WECHAT_ENTERPRISE: |
203 | 138 | enabled: false |
204 | - #CORP_ID | |
205 | 139 | client-id: ?? |
206 | - #SECRET | |
207 | 140 | client-secret: ?? |
208 | 141 | agent-id: ?? |
209 | - #自建应用秘钥(新版企微需要配置) | |
210 | - # agent-app-secret: ?? | |
211 | - #钉钉 | |
212 | 142 | DINGTALK: |
213 | 143 | enabled: false |
214 | - # appKey | |
215 | 144 | client-id: ?? |
216 | - # appSecret | |
217 | 145 | client-secret: ?? |
218 | 146 | agent-id: ?? |
219 | 147 | \ No newline at end of file |
... | ... |
jeecg-boot/jeecg-cloud-module/jeecg-cloud-nacos/docs/config/jeecg-gateway-dev.yaml
0 → 100644
jeecg-boot/jeecg-cloud-module/jeecg-cloud-nacos/docs/config/jeecg-gateway-router.json
0 → 100644
1 | +[{ | |
2 | + "id": "jeecg-system", | |
3 | + "order": 0, | |
4 | + "predicates": [{ | |
5 | + "name": "Path", | |
6 | + "args": { | |
7 | + "_genkey_0": "/sys/**", | |
8 | + "_genkey_1": "/jmreport/**", | |
9 | + "_genkey_3": "/online/**", | |
10 | + "_genkey_4": "/generic/**" | |
11 | + } | |
12 | + }], | |
13 | + "filters": [], | |
14 | + "uri": "lb://jeecg-system" | |
15 | +}, { | |
16 | + "id": "jeecg-demo", | |
17 | + "order": 1, | |
18 | + "predicates": [{ | |
19 | + "name": "Path", | |
20 | + "args": { | |
21 | + "_genkey_0": "/mock/**", | |
22 | + "_genkey_1": "/test/**", | |
23 | + "_genkey_2": "/bigscreen/template1/**", | |
24 | + "_genkey_3": "/bigscreen/template2/**" | |
25 | + } | |
26 | + }], | |
27 | + "filters": [], | |
28 | + "uri": "lb://jeecg-demo" | |
29 | +}, { | |
30 | + "id": "jeecg-system-websocket", | |
31 | + "order": 2, | |
32 | + "predicates": [{ | |
33 | + "name": "Path", | |
34 | + "args": { | |
35 | + "_genkey_0": "/websocket/**", | |
36 | + "_genkey_1": "/newsWebsocket/**" | |
37 | + } | |
38 | + }], | |
39 | + "filters": [], | |
40 | + "uri": "lb:ws://jeecg-system" | |
41 | +}, { | |
42 | + "id": "jeecg-demo-websocket", | |
43 | + "order": 3, | |
44 | + "predicates": [{ | |
45 | + "name": "Path", | |
46 | + "args": { | |
47 | + "_genkey_0": "/vxeSocket/**" | |
48 | + } | |
49 | + }], | |
50 | + "filters": [], | |
51 | + "uri": "lb:ws://jeecg-demo" | |
52 | +}] | |
0 | 53 | \ No newline at end of file |
... | ... |
jeecg-boot/jeecg-cloud-module/jeecg-cloud-nacos/docs/config/jeecg.yaml
... | ... | @@ -16,12 +16,12 @@ management: |
16 | 16 | endpoints: |
17 | 17 | web: |
18 | 18 | exposure: |
19 | - include: "*" #暴露所有节点 | |
19 | + include: "*" | |
20 | 20 | health: |
21 | - sensitive: true #关闭过滤敏感信息 | |
21 | + sensitive: true | |
22 | 22 | endpoint: |
23 | 23 | health: |
24 | - show-details: ALWAYS #显示详细信息 | |
24 | + show-details: ALWAYS | |
25 | 25 | spring: |
26 | 26 | servlet: |
27 | 27 | multipart: |
... | ... | @@ -38,15 +38,11 @@ spring: |
38 | 38 | starttls: |
39 | 39 | enable: true |
40 | 40 | required: true |
41 | - ## quartz定时任务,采用数据库方式 | |
42 | 41 | quartz: |
43 | 42 | job-store-type: jdbc |
44 | 43 | initialize-schema: embedded |
45 | - #设置自动启动,默认为 true | |
46 | 44 | auto-startup: false |
47 | - #延迟1秒启动定时任务 | |
48 | 45 | startup-delay: 1s |
49 | - #启动时更新己存在的Job | |
50 | 46 | overwrite-existing-jobs: true |
51 | 47 | properties: |
52 | 48 | org: |
... | ... | @@ -66,7 +62,6 @@ spring: |
66 | 62 | threadCount: 10 |
67 | 63 | threadPriority: 5 |
68 | 64 | threadsInheritContextClassLoaderOfInitializingThread: true |
69 | - #json 时间戳统一转换 | |
70 | 65 | jackson: |
71 | 66 | date-format: yyyy-MM-dd HH:mm:ss |
72 | 67 | time-zone: GMT+8 |
... | ... | @@ -74,49 +69,32 @@ spring: |
74 | 69 | proxy-target-class: true |
75 | 70 | activiti: |
76 | 71 | check-process-definitions: false |
77 | - #启用作业执行器 | |
78 | 72 | async-executor-activate: false |
79 | - #启用异步执行器 | |
80 | 73 | job-executor-activate: false |
81 | 74 | jpa: |
82 | 75 | open-in-view: false |
83 | - #配置freemarker | |
84 | 76 | freemarker: |
85 | - # 设置模板后缀名 | |
86 | 77 | suffix: .ftl |
87 | - # 设置文档类型 | |
88 | 78 | content-type: text/html |
89 | - # 设置页面编码格式 | |
90 | 79 | charset: UTF-8 |
91 | - # 设置页面缓存 | |
92 | 80 | cache: false |
93 | 81 | prefer-file-system-access: false |
94 | - # 设置ftl文件路径 | |
95 | 82 | template-loader-path: |
96 | 83 | - classpath:/templates |
97 | - # 设置静态文件路径,js,css等 | |
98 | 84 | mvc: |
99 | 85 | static-path-pattern: /** |
100 | - #Spring Boot 2.6+后需手动指定为ant-path-matcher | |
101 | 86 | pathmatch: |
102 | 87 | matching-strategy: ant_path_matcher |
103 | 88 | resource: |
104 | 89 | static-locations: classpath:/static/,classpath:/public/ |
105 | 90 | autoconfigure: |
106 | 91 | exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure |
107 | -#mybatis plus 设置 | |
108 | 92 | mybatis-plus: |
109 | 93 | mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml |
110 | 94 | global-config: |
111 | - # 关闭MP3.0自带的banner | |
112 | 95 | banner: false |
113 | 96 | db-config: |
114 | - #主键类型 0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)"; | |
115 | 97 | id-type: ASSIGN_ID |
116 | - # 默认数据库表下划线命名 | |
117 | 98 | table-underline: true |
118 | 99 | configuration: |
119 | - # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 | |
120 | - #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | |
121 | - # 返回类型为Map,显示null对应的字段 | |
122 | 100 | call-setters-on-nulls: true |
123 | 101 | \ No newline at end of file |
... | ... |