Commit e896f22a36f22cb3d0c02d45a51dc610b059696d

Authored by zhangdaiscott
1 parent d90d176c

升级Spring Cloud Alibaba 2021.0.1.0,使用 spring.config.import 方式引入nacos配置

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