|
@@ -0,0 +1,150 @@
|
|
|
|
+spring:
|
|
|
|
+ application:
|
|
|
|
+ name: wf-platform-equipment-automation
|
|
|
|
+ liquibase:
|
|
|
|
+ enabled: false
|
|
|
|
+ data:
|
|
|
|
+ mongodb:
|
|
|
|
+ host: 192.168.50.20
|
|
|
|
+ port: 27017
|
|
|
|
+ database: stong-history
|
|
|
|
+ username: stong
|
|
|
|
+ password: stong
|
|
|
|
+ datasource:
|
|
|
|
+ url: ${SPRING_DATASOURCE_URL:jdbc:mysql://192.168.50.20:3306/wf_platform_equipment?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8}
|
|
|
|
+ username: ${SPRING_DATASOURCE_USERNAME:root}
|
|
|
|
+ password: ${SPRING_DATASOURCE_PASSWORD:666Stkj!}
|
|
|
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
|
+ hikari:
|
|
|
|
+ # 连接池最小空闲连接数
|
|
|
|
+ minimum-idle: ${SPRING_DATASOURCE_MINIMUM_IDLE:20}
|
|
|
|
+ # 连接池允许的最大连接数
|
|
|
|
+ maximum-pool-size: ${SPRING_DATASOURCE_MAXIMUM_POOL_SIZE:200}
|
|
|
|
+ # 等待连接池分配连接的最大时长(毫秒)
|
|
|
|
+ connection-timeout: ${SPRING_DATASOURCE_CONNECTION_TIMEOUT:30000}
|
|
|
|
+ redis:
|
|
|
|
+ host: ${SPRING_REDIS_HOST:192.168.50.20}
|
|
|
|
+ port: ${SPRING_REDIS_PORT:6379}
|
|
|
|
+ database: ${SPRING_REDIS_DATABASE:3}
|
|
|
|
+ lettuce:
|
|
|
|
+ pool:
|
|
|
|
+ # 资源池中最大连接数
|
|
|
|
+ # 默认8,-1表示无限制;可根据服务并发redis情况及服务端的支持上限调整
|
|
|
|
+ max-active: ${SPRING_REDIS_POOL_MAX_ACTIVE:50}
|
|
|
|
+ # 资源池运行最大空闲的连接数
|
|
|
|
+ # 默认8,-1表示无限制;可根据服务并发redis情况及服务端的支持上限调整,一般建议和max-active保持一致,避免资源伸缩带来的开销
|
|
|
|
+ max-idle: ${SPRING_REDIS_POOL_MAX_IDLE:50}
|
|
|
|
+ # 当资源池连接用尽后,调用者的最大等待时间(单位为毫秒)
|
|
|
|
+ # 默认 -1 表示永不超时,设置5秒
|
|
|
|
+ max-wait: ${SPRING_REDIS_POOL_MAX_WAIT:5000}
|
|
|
|
+ activiti:
|
|
|
|
+ # 禁用activiti自动更新表结构
|
|
|
|
+ database-schema-update: false
|
|
|
|
+ # 开启历史日志,正式环境应关闭
|
|
|
|
+ history-level: none
|
|
|
|
+ async-executor:
|
|
|
|
+ max-async-jobs-due-per-acquisition: 100
|
|
|
|
+ servlet:
|
|
|
|
+ multipart:
|
|
|
|
+ # 单个文件上传最大
|
|
|
|
+ maxFileSize: ${SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE:30MB}
|
|
|
|
+ # 上传请求最大限制
|
|
|
|
+ maxRequestSize: ${SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE:30MB}
|
|
|
|
+ thymeleaf:
|
|
|
|
+ prefix: classpath:/view/
|
|
|
|
+ mode: LEGACYHTML5
|
|
|
|
+ resources:
|
|
|
|
+ # 资源缓存时间,单位秒
|
|
|
|
+ cache:
|
|
|
|
+ period: 3600
|
|
|
|
+ # 启用缓存
|
|
|
|
+ chain.cache: true
|
|
|
|
+ # 静态资源映射
|
|
|
|
+ static-locations: classpath:/static/,classpath:/view/
|
|
|
|
+ mvc:
|
|
|
|
+ view:
|
|
|
|
+ suffix: .html # 返回页面自动拼接.html后缀
|
|
|
|
+ main:
|
|
|
|
+ allow-bean-definition-overriding: true
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+server:
|
|
|
|
+ undertow:
|
|
|
|
+ # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接
|
|
|
|
+ # 默认值为8,建议设置每个CPU核心一个线程
|
|
|
|
+ threads:
|
|
|
|
+ io: ${SERVER_UNDERTOW_IO_THREADS:4}
|
|
|
|
+ # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程
|
|
|
|
+ # 默认等于 io-threads*8,它的值设置取决于系统的负载,可适当调大该值
|
|
|
|
+ worker: ${SERVER_UNDERTOW_WORKER_THREADS:128}
|
|
|
|
+ # 每块buffer的空间大小,越小空间被利用越充分
|
|
|
|
+ # 不要设置太大,以免影响其他应用,合适即可
|
|
|
|
+ buffer-size: ${SERVER_UNDERTOW_BUFFER_SIZE:1024}
|
|
|
|
+ # 是否分配的直接内存(NIO直接分配的堆外内存)
|
|
|
|
+ # 默认false
|
|
|
|
+ direct-buffers: true
|
|
|
|
+ # HTTP POST请求最大的大小
|
|
|
|
+ # 默认0,无限制,可设置10M
|
|
|
|
+ max-http-post-size: 10485760
|
|
|
|
+ allow-unescaped-characters-in-url: true
|
|
|
|
+
|
|
|
|
+ servlet:
|
|
|
|
+ context-path: /wfauto
|
|
|
|
+feign:
|
|
|
|
+ hystrix:
|
|
|
|
+ enabled: true
|
|
|
|
+
|
|
|
|
+hystrix:
|
|
|
|
+ threadpool:
|
|
|
|
+ default:
|
|
|
|
+ # 执行命令线程池的核心线程数,也是命令执行的最大并发量
|
|
|
|
+ # 默认10
|
|
|
|
+ coreSize: 1000
|
|
|
|
+ # 最大执行线程数
|
|
|
|
+ maximumSize: 1000
|
|
|
|
+ command:
|
|
|
|
+ default:
|
|
|
|
+ execution:
|
|
|
|
+ isolation:
|
|
|
|
+ thread:
|
|
|
|
+ # HystrixCommand 执行的超时时间,超时后进入降级处理逻辑。一个接口,理论的最佳响应速度应该在200ms以内,或者慢点的接口就几百毫秒。
|
|
|
|
+ # 默认 1000 毫秒,最高设置 2000足矣。如果超时,首先看能不能优化接口相关业务、SQL查询等,不要盲目加大超时时间,否则会导致线程堆积过多,hystrix 线程池卡死,最终服务不可用。
|
|
|
|
+ timeoutInMilliseconds: ${HYSTRIX_COMMAND_TIMEOUT_IN_MILLISECONDS:40000}
|
|
|
|
+
|
|
|
|
+ribbon:
|
|
|
|
+ # 客户端读取超时时间,超时时间要小于Hystrix的超时时间,否则重试机制就无意义了
|
|
|
|
+ ReadTimeout: ${RIBBON_READ_TIMEOUT:30000}
|
|
|
|
+ # 客户端连接超时时间
|
|
|
|
+ ConnectTimeout: ${RIBBON_CONNECT_TIMEOUT:3000}
|
|
|
|
+ # 访问实例失败(超时),允许自动重试,设置重试次数,失败后会更换实例访问,请一定确保接口的幂等性,否则重试可能导致数据异常。
|
|
|
|
+ OkToRetryOnAllOperations: true
|
|
|
|
+ MaxAutoRetries: 1
|
|
|
|
+ MaxAutoRetriesNextServer: 1
|
|
|
|
+
|
|
|
|
+logging:
|
|
|
|
+ level:
|
|
|
|
+ org.apache.ibatis: ${LOG_LEVEL:info}
|
|
|
|
+ io.choerodon: ${LOG_LEVEL:info}
|
|
|
|
+ cn.sciento.boot.admin: ${LOG_LEVEL:false} # 注册到admin出错不打印
|
|
|
|
+ cn.sciento: ${LOG_LEVEL:info} # 其他sciento包进行打印
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+mybatis:
|
|
|
|
+ mapperLocations: classpath*:/mapper/*.xml
|
|
|
|
+ configuration:
|
|
|
|
+ map-underscore-to-camel-case: true
|
|
|
|
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
|
|
|
+ cache-enabled: false
|
|
|
|
+
|
|
|
|
+rocketmq:
|
|
|
|
+ name-server: 192.168.50.21:9876
|
|
|
|
+
|
|
|
|
+# stong配置
|
|
|
|
+stong:
|
|
|
|
+ collect-data-expire-duration: 30
|
|
|
|
+ signal-lock-time: 2
|
|
|
|
+ device-service-name: wf-platform-equipment
|
|
|
|
+ strategy-message-topic: wfpe_push_data_gateway_collection
|
|
|
|
+ strategy-message-group: automation-strategy-group
|
|
|
|
+ process-recover:
|
|
|
|
+ enable: false
|