forked from kidgrow-microservices-platform

zhaoxiaohao
2021-03-08 3cc66f911c6a7b0d55ddb58c67e16963195ea351
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
spring:
  application:
    name: zuul-server
  #配置Redis
  redis:
    host: ${spring.redis.host}
    port: ${spring.redis.port}
    password: ${spring.redis.password}
    timeout: ${spring.redis.timeout}
server:
  tomcat:
    uri-encoding: UTF-8
    max-threads: 1000
    min-spare-threads: 30
  port: 8888
 
 
eureka:
  instance:
    ###注册中心ip地址
    hostname: ${kidgrow.eureka.instance.hostname}
    instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
    prefer-ip-address: true
  client:
    serviceUrl:
#      defaultZone: http://192.168.2.240:9001/eureka/
      defaultZone: ${kidgrow.eureka.client.serviceUrl.defaultZone}
 
zuul:
  ignoredServices: '*'
  add-proxy-headers: false
  # 使用 prefix 添加前缀
  #prefix: /api
  #关闭重试
  retryable: false
  ignored-headers: Access-Control-Allow-Credentials,Access-Control-Allow-Origin,Access-Control-Allow-Methods
  add-host-header: true
  host:
#    connectTimeoutMillis: 10000
    socket-timeout-millis: 100000
    connect-timeout-millis: 100000
  routes:
    auth:
      path: /api-uaa/**
      service-id: uaa-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    auth-login-page:
      path: /login.html
      service-id: uaa-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    auth-login-process:
      path: /user/login
      service-id: uaa-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    auth-login-token:
      path: /oauth/token
      service-id: uaa-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    auth-login-authorize:
      path: /oauth/authorize
      service-id: uaa-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    auth-check-process:
      path: /oauth/check_token
      service-id: uaa-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    user:
      path: /api-user/**
      service-id: usercenter-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    codegenerator:
      path: /api-generator/**
      service-id: code-generator
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    file:
      path: /api-file/**
      service-id: filecenter-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    record-center:
      path: /api-record/**
      service-id: recordcenter-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    record-bicenter:
      path: /api-bicenter/**
      service-id: bicenter-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    sms:
      path: /api-sms/**
      service-id: sms-service-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    log:
      path: /api-log/**
      service-id: logcenter-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    search:
      path: /api-search/**
      service-id: searchcenter-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    oprationcenter:
      path: /api-opration/**
      service-id: oprationcenter-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    demo-order:
      path: /api-order/**
      service-id: demo-order-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    demo-product:
      path: /api-product/**
      service-id: demo-product-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    client-service-routes:
      path: /clienttest/**
      service-id: client-service
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    reportcenter-server-routes:
      path: /reportcenter-server/**
      service-id: reportcenter-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    demo-aspnet-server-routes:
      path: /demoaspnetserver/**
      service-id: demo-aspnet-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    wechat-server-routes:
      path: /wechatserver/**
      service-id: wechat-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    api-evaluation:
      path: /api-evaluation/**
      service-id: boneage-evaluationcenter-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
    api-smartbox:
      path: /api-smart/**
      service-id: smartbox-server
      strip-prefix: true
      sensitive-headers: '*'
      custom-sensitive-headers: true
  ssl-hostname-validation-enabled: false
 
 
 
#全局的ribbon设置
ribbon:
  ConnectTimeout: 15000
  ReadTimeout: 16000
hystrix:
  threadpool:
    default:
      coreSize: 100
      maximumSize: 2000
      allowMaximumSizeToDivergeFromCoreSize: true
      maxQueueSize: -1
  command:
    default:
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 300000
 
kidgrow:
  oauth2:
    token:
      store:
        type: redis
  api:
    #动态权限控制
    access-control: false
    #校验参数签名
    check-sign: false
    #接口调试,生产环境设为false
    api-debug: true
    # 始终放行
    permit-all:
      - /*/login/**
      - /*/logout/**
      - /*/oauth/**
      - /actuator/health
      - /actuator/info
      - /api-file/smsChangLan/send
      - /api-user/users/doctorUserReg
      - /api-user/users/isRegUser
      - /api-user/users/passwordByPhone
      - /api-evaluation/evaluationxrayinfo/appUpload
      - /api-evaluation/evaluationxrayinfo/appSave
      - /api-file/baseUplaod
      - /api-file/feignUploadHosIdAndDepId
      - /api-user/users/python
      - /api-evaluation/evaluationxrayinfo/checkQRCode
      - /api-opration/wxController/callback
      - /api-opration/alipay/notify
      - /api-opration/alipay/return
      - /api-record/DiagnosticUnfinishedFegin/equipmentList
      - /api-record/DiagnosticUnfinishedFegin/equipmentUpload
      - /api-opration/wxController/getOpenId
      - /api-record/DiagnosticUnfinishedFegin/recordChildInterworking
      - /api-uaa/tokens/getName
#      - /api-user/syshospital/findAllByMap
#      - /api-user/sysdictionaries/findAll
#      - /api-user/sysdepartment/findListByHospitalId
    # 忽略权限鉴定
    authority-ignores:
      - /*/authority/granted/me
      - /*/authority/granted/me/menu
      - /*/current/user/**
    # 签名忽略
    sign-ignores:
      - /**/login/**
      - /**/logout/**
  security:
    ignore:
      # 忽略认证的地址
      httpUrls: >
        /api-uaa/oauth/**,
        /api-uaa/validata/**,
        /api-uaa/css/**,
        /api-uaa/images/**,
        /api-uaa/js/**,
        /api-user/users-anon/**,
        /login.html,
        /user/login,
        /api-file/smsChangLan/send,
        /api-user/users/doctorUserReg,
        /api-file/files-upload,
        /api-file/feignUploadHosIdAndDepId,
        /api-user/users/isRegUser,
        /api-user/users/passwordByPhone,
        /api-evaluation/evaluationxrayinfo/appUpload,
        /api-evaluation/evaluationxrayinfo/appSave,
        /api-file/baseUplaod,
        /api-user/users/python,
        /api-evaluation/evaluationxrayinfo/checkQRCode,
        /api-opration/wxController/callback,
        /api-opration/alipay/return,
        /api-opration/alipay/notify,
        /api-record/DiagnosticUnfinishedFegin/equipmentList,
        /api-record/DiagnosticUnfinishedFegin/equipmentUpload,
        /api-opration/wxController/getOpenId,
        /api-record/DiagnosticUnfinishedFegin/recordChildInterworking,
        /api-uaa/tokens/getName
#        /api-user/syshospital/findAllByMap,
#        /api-user/sysdictionaries/findAll,
#        /api-user/sysdepartment/findListByHospitalId
    auth:
      #开启时间戳验证
      timestampenable: false
      #时间戳校验时长,单位秒
      timestampnum: 1000
      #不需要校验时间戳的Url
      httpTimestampUrl: >
        /api-uaa/oauth/**,
        /api-uaa/validata/**
      urlPermission:
        #是否开启url级别权限
        enable: false
        #配置只进行登录认证,不进行url权限认证的api
        ignoreUrls: >
          /api-user/menus/current,
          /api-user/users/current,
          /api-log/requestStat
          /wechatserver/Wechat/GetScreenCount
          /wechatserver/news/LastestNews
        #白名单,需要URL认证的应用ID
        includeClientIds:
          - webApp
          - hospital
          - kidgrow
      renew:
        #是否开启token自动续签(目前只有redis实现)
        enable: true
        #白名单
        includeClientIds:
          - webApp
          - hospital
          - kidgrow
authentication:
  user:
    header-name: token
    pub-key: client/pub.key    # 解密
 
swagger:
  butler:
    auto-generate-from-zuul-routes: true
    generate-routes: user,file,log,codegenerator,auth
    apiDocsPath: v2/api-docs