yangys
2025-04-10 220141036107ef2103833fcd878de43307ca0905
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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
#服务器配置
server:
  port: 4102
  undertow:
    threads:
      # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
      io: 16
      # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
      worker: 400
    # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
    buffer-size: 1024
    # 是否分配的直接内存
    direct-buffers: true
 
spring:
  application:
    name: smartman-api
  banner:
    location: classpath:smartbanner.txt
  resources:
    static-locations: static
  thymeleaf:
    cache: false
  mvc:
    static-path-pattern: classpath:/static/**
  redis:
    ##redis 单机环境配置
    host: ${redis.host}
    port: ${redis.port}
    password: ${redis.password}
    database: ${redis.database}
    ssl: ${redis.ssl}
    ##redis 集群环境配置
    #cluster:
    #  nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
    #  commandTimeout: 5000
  #排除DruidDataSourceAutoConfigure
  autoconfigure:
    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
  datasource:
    dynamic:
      #设置默认的数据源或者数据源组,默认值即为master
      druid:
        initial-size: 1
        max-active: 200
        min-idle: 1
        max-wait: 5000
      primary: master
      health: false
      lazy: true
      datasource:
        master:
          url: jdbc:${datasource.type}://${datasource.url}:${datasource.port}/${datasource.database}?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true&rewriteBatchedStatements=true
#          url: ${datasource.url}
          username: ${datasource.username}
          password: ${datasource.password}
          driver-class-name: ${datasource.driver-class-name}
        iotdb:
          driver-class-name: ${iotdb.driver}
          url: jdbc:iotdb://${iotdb.host}:${iotdb.port}/
          username: ${iotdb.username}
          password: ${iotdb.password}
          type: com.zaxxer.hikari.HikariDataSource
          hikari:
            minimum-idle: 5
            maximum-pool-size: 15
            auto-commit: true
            idle-timeout: 30000
            pool-name: DatebookHikariCP
            max-lifetime: 1800000
            connection-timeout: 30000
            connection-test-query: select count(*) from root.test
  # 资源信息
  messages:
    # 国际化资源文件路径
    basename: "static/i18n/masterlink-*,masterlink-*,org.springframework.security.messages,org.springframework.web.bind"
    encoding: UTF-8
  boot:
    admin:
      client:
        url: http://127.0.0.1:${server.port}
        instance:
          prefer-ip: true
 
management:
  endpoints:
    web:
      exposure:
        include: "*"
  endpoint:
    health:
      show-details: ALWAYS
 
# mybatis
mybatis-plus:
  tenant-model: false
  mapper-locations: classpath:com/qianwen/**/mapper/*Mapper.xml
  type-handlers-package: com.qianwen.smartman.common.typehandlers
  #oracle环境mapper映射
#  mapper-locations: classpath:com/qianwen/**/mapperOracle/*Mapper.xml,classpath:com/qianwen/**/mapper/*Mapper.xml
  #实体扫描,多个package用逗号或者分号分隔
  typeAliasesPackage: com.qianwen.**.entity
  #typeEnumsPackage: com.qianwen.dashboard.entity.enums
  global-config:
    # 关闭MP3.0自带的banner
    banner: false
    db-config:
      #主键类型  0:"数据库ID自增", 1:"不操作", 2:"用户输入ID",3:"数字型snowflake", 4:"全局唯一ID UUID", 5:"字符串型snowflake";
      id-type: assign_id
      #字段策略
      insert-strategy: not_null
      update-strategy: not_null
      where-strategy: not_null
      #驼峰下划线转换
      table-underline: true
      # 逻辑删除配置
      # 逻辑删除全局值(1表示已删除,这也是Mybatis Plus的默认配置)
      logic-delete-value: unix_timestamp(NOW())
      # oracl时间戳获取方式
#      logic-delete-value: (SELECT ( SYSDATE - to_date('1970-1-1 8', 'yyyy-mm-dd hh24') ) * 86400 AS unix_timestamp FROM DUAL)
      # 逻辑未删除全局值(0表示未删除,这也是Mybatis Plus的默认配置)
      logic-not-delete-value: 0
  configuration:
    map-underscore-to-camel-case: true
    cache-enabled: false
    jdbc-type-for-null: 'null'
 
#knife4j配置(swagger增强)
knife4j:
  #启用
  enable: false
  #基础认证
  basic:
    enable: false
    username: smart
    password: smart
  #增强配置
  setting:
    enableSwaggerModels: true
    enableDocumentManage: true
    enableHost: false
    enableHostText: http://localhost
    enableRequestCache: true
    enableFilterMultipartApis: false
    enableFilterMultipartApiMethodType: POST
    language: zh-CN
    enableFooter: false
    enableFooterCustom: true
    footerCustomContent: Copyright © 2021 Smartm All Rights Reserved
 
#swagger公共信息
swagger:
  enable: false
  title: smart 接口文档系统
  description: smart 接口文档系统
  version: 2.8.2.RELEASE
  license: qianwen
  license-url: https://x
  terms-of-service-url: https://xx
  contact:
    name: y_ys79
    email: y_ys79@sina.com
    url: https://gitee.com/xx
 
#flowable配置
#flowable:
#  activity-font-name: \u5B8B\u4F53
#  label-font-name: \u5B8B\u4F53
#  annotation-font-name: \u5B8B\u4F53
#  check-process-definitions: false
#  database-schema-update: false
 
#报表配置
report:
  enabled: false
  database:
    provider:
      prefix: blade-
 
#oss默认配置
oss:
  enabled: true
  name: mino
  tenant-mode: true
  endpoint: http://192.168.3.107:31032
  access-key: admin
  secret-key: admin123
  bucket-name: bladex
 
#积木报表oss配置
jeecg:
  uploadType: minio
  minio:
    minio_url: ${oss.endpoint}
    minio_name: ${oss.access-key}
    minio_pass: ${oss.secret-key}
    bucketName: ${oss.bucket-name}
  jmreport:
    #接口超时设置(毫秒)
    connect-timeout: 300000
 
#第三方登陆配置
social:
  oauth:
    WECHAT_OPEN:
      client-id: 233************
      client-secret: 233************************************
      redirect-uri: ${social.domain}/oauth/redirect/wechat
    DINGTALK:
      client-id: 233************
      client-secret: 233************************************
      redirect-uri: ${social.domain}/oauth/redirect/dingtalk
    WECHAT_ENTERPRISE_WEB:
      client-id: ww90652807a231e44a
      client-secret: FG-GOrBHp37TcMqujoV8H4FR1lHhI1V7xeg43HyaBY0
      ignoreCheckState: true
    DINGTALK_WEB:
      client-id: dingg5jafkfz34yfjmtz
      client-secret: ozb1ni15ZJfSuQNSuEp1Aw4x3eWcFZIRIyV11NdupMdSGMqFblZp8Q98ldH7qFVp
      ignoreCheckState: true
 
#blade配置
blade:
  #token配置
  token:
    #是否有状态
    state: false
  #redis序列化方式
  redis:
    serializer-type: JSON
  #接口配置
  api:
    #报文加密配置
    crypto:
      #启用报文加密配置
      enabled: false
      #使用AesUtil.genAesKey()生成
      aes-key: O2BEeIv399qHQNhD6aGW8R8DEj4bqHXm
      #使用DesUtil.genDesKey()生成
      des-key: jMVCBsFGDQr1USHo
  #jackson配置
  jackson:
    #null自动转空值
    null-to-empty: false
    #大数字自动转字符串
    big-num-to-string: true
    #支持text文本请求,与报文加密同时开启
    support-text-plain: false
  #xss配置
  xss:
    enabled: false
    skip-url:
      - /blade-chat/weixin
      - /blade-desk/notice/submit
      - /blade-notify/notifier/template
      - /blade-cps/employee/export-template
      - /blade-cps/employee/import-employee
  #安全框架配置
  secure:
    #接口放行
    skip-url:
      - /blade-system/param/version
      - /blade-auth/resource/token
      - /blade-cps/init/**
      - /blade-dnc/transfer-directory/get-online-read-file
      - /blade-mdc/status-record/cross-days
      - /blade-system/param/detail
      - /blade-system/application/list
      - /jmreport/**
      - /blade-sync/ding/dingCallback
      - /blade-sync/ding-sync/scan
      - /blade-sync/event/callback
      - /blade-auth/ding/token
      - /blade-auth/qy-wechat/token
      - /sse/**
      - /blade-sync/wechat/scan
      - /blade-sync/wechat/generate
      - /blade-sync/login/**
      - /blade-sync/outer-app-config/appStatus
      - /blade-cps/workstation/page
      - /blade-cps/group/groupWorkstation/jimu
      - /blade-fms/order/process/issued
      - /blade-cps/test/**
      - /test/*
    #授权认证配置
    auth:
      - method: ALL
        pattern: /blade-chat/weixin/**
        expression: "hasAuth()"
      - method: POST
        pattern: /blade-desk/dashboard/upload
        expression: "hasTimeAuth(9, 17)"
      - method: POST
        pattern: /blade-desk/dashboard/submit
        expression: "hasAnyRole('administrator', 'admin', 'user')"
    #基础认证配置
    basic:
      - method: ALL
        pattern: /blade-desk/dashboard/info
        username: "blade"
        password: "blade"
    #动态签名认证配置
    sign:
      - method: ALL
        pattern: /blade-desk/dashboard/sign
        crypto: "sha1"
    #多终端认证配置
    client:
      - client-id: sword
        path-patterns:
          - /blade-sword/**
      - client-id: saber
        path-patterns:
          - /blade-saber/**
  #多租户配置
  tenant:
    #多租户增强
    enhance: false
    #多租户授权保护
    license: false
    #动态数据源功能
    dynamic-datasource: false
    #动态数据源全局扫描
    dynamic-global: false
    #多租户字段名
    column: tenant_id
    #排除多租户逻辑
    exclude-tables:
      - blade_user
 
  #分布式锁配置
  lock:
    ##是否启用分布式锁
    enabled: true
    ##redis服务地址
    address: redis://${redis.host}:${redis.port}
    password: ${redis.password}
  #本地文件上传
  file:
    remote-mode: true
    upload-domain: http://localhost:8999
    remote-path: /usr/share/nginx/html
  xsequence:
    redis:
      ip: ${redis.host}
      port: ${redis.port}
      auth: ${redis.password}
    db:
      enabled: true
  data-scope:
    mapper-exclude:
      - SuperAggregateStateMapper
      - SuperProcessParameterMapper
      - SuperAlarmMapper
      - TgengineMapper
      - FlowMapper
      - SuperNewCollectMapper
 
license:
  subject: user #主体 - 注意主体要与生成证书的主体一致一致,不然验证通过不了
  publicAlias: publiccert #公钥别称
  storePass: a1b2c3z4 #访问公钥库的密码
  licensePath: D:\certs\hwserver\mdc.lic #license位置
  publicKeysStorePath: D:\certs\hwserver\publicCerts.store #公钥位置
forest:
  bean-id: config0 # 在spring上下文中bean的id, 默认值为forestConfiguration
  backend: okhttp3 # 后端HTTP API: okhttp3 【支持`okhttp3`/`httpclient`】
  max-connections: 1000 # 连接池最大连接数,默认值为500
  max-route-connections: 500 # 每个路由的最大连接数,默认值为500
  timeout: 8000 # 请求超时时间,单位为毫秒, 默认值为3000
  connect-timeout: 8000 # 连接超时时间,单位为毫秒, 默认值为2000
  ssl-protocol: SSLv3 # 单向验证的HTTPS的默认SSL协议,默认为SSLv3
  logEnabled: true # 打开或关闭日志,默认为true
  variables:
    baseurl: http://localhost:8085