application.yml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. server:
  2. port: 8848
  3. spring:
  4. profiles:
  5. active: dev
  6. application:
  7. name: jetlinks-platform
  8. jackson:
  9. date-format: yyyy-MM-dd HH:mm:ss
  10. time-zone: Asia/Shanghai
  11. serialization:
  12. WRITE_DATES_AS_TIMESTAMPS: true
  13. default-property-inclusion: non_null
  14. resources:
  15. static-locations: file:./static/,/,classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/, classpath:/public/
  16. redis:
  17. host: 192.168.104.114
  18. # host: 1.15.89.83
  19. port: 6379
  20. password: 6E6985E1F7CB40F24A\.
  21. lettuce:
  22. pool:
  23. max-active: 1024
  24. max-idle: 8
  25. timeout: 20s
  26. serializer: jdk # 设置fst时,redis key使用string序列化,value使用 fst序列化.
  27. # database: 3
  28. # max-wait: 10s
  29. r2dbc:
  30. url: r2dbc:postgresql://192.168.104.114:5432/jetlinks?stringtype=unspecified
  31. # url: r2dbc:mysql://192.168.100.32:3306/jetlinks
  32. # username: root
  33. # password: 123456
  34. username: postgres
  35. password: jetlinks
  36. pool:
  37. max-size: 32
  38. reactor:
  39. debug-agent:
  40. enabled: false
  41. data:
  42. elasticsearch:
  43. client:
  44. reactive:
  45. endpoints: 192.168.104.114:9200
  46. max-in-memory-size: 100MB
  47. socket-timeout: 1000
  48. connection-timeout: 10000
  49. easyorm:
  50. default-schema: public # 数据库默认的schema
  51. dialect: postgres #数据库方言
  52. elasticsearch:
  53. embedded:
  54. enabled: false # 为true时使用内嵌的elasticsearch,不建议在生产环境中使用
  55. data-path: ./data/elasticsearch
  56. port: 9200
  57. host: 192.168.104.114
  58. client:
  59. host: 192.168.100.114
  60. port: 9200
  61. max-conn-total: 128
  62. connect-timeout: 5000
  63. socket-timeout: 5000
  64. connection-request-timeout: 8000
  65. index:
  66. default-strategy: time-by-month #默认es的索引按月进行分表, direct则为直接操作索引.
  67. settings:
  68. number-of-shards: 1 # es 分片数量
  69. number-of-replicas: 0 # 副本数量
  70. device:
  71. message:
  72. default-timeout: 20
  73. writer:
  74. time-series:
  75. enabled: true #写出设备消息数据到elasticsearch
  76. captcha:
  77. enabled: false # 开启验证码
  78. ttl: 5m #验证码过期时间,2分钟
  79. hsweb:
  80. cors:
  81. enable: true
  82. configs:
  83. - path: /**
  84. allowed-headers: "*"
  85. allowed-methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]
  86. allowed-origins: ["*"]
  87. allow-credentials: true
  88. max-age: 1800
  89. dict:
  90. enum-packages: org.jetlinks
  91. file:
  92. upload:
  93. static-file-path: ./static/upload
  94. static-location: http://localhost:8848/upload
  95. webflux:
  96. response-wrapper:
  97. enabled: true #开启响应包装器(将返回值包装为ResponseMessage)
  98. excludes: # 这下包下的接口不包装
  99. - org.springdoc
  100. # auth: #默认的用户配置
  101. # users:
  102. # admin:
  103. # username: admin
  104. # password: admin
  105. # name: 超级管理员
  106. authorize:
  107. auto-parse: true
  108. permission:
  109. filter:
  110. enabled: true # 设置为true开启权限过滤,赋权时,不能赋予比自己多的权限.
  111. exclude-username: admin # admin用户不受上述限制
  112. un-auth-strategy: ignore # error表示:发生越权时,抛出403错误. ignore表示会忽略越权的赋权.
  113. cache:
  114. type: redis
  115. redis:
  116. local-cache-type: guava
  117. jetlinks:
  118. # server-id: ${spring.application.name}:${server.port} #设备服务网关服务ID,不同服务请设置不同的ID
  119. logging:
  120. system:
  121. context:
  122. server: tuoren
  123. protocol:
  124. spi:
  125. enabled: true # 为true时开启自动加载通过依赖引入的协议包
  126. cluster: true
  127. logging:
  128. level:
  129. org.jetlinks: error
  130. rule.engine: debug
  131. org.hswebframework: error
  132. org.springframework.transaction: error
  133. org.springframework.data.r2dbc.connectionfactory: error
  134. io.micrometer: warn
  135. org.hswebframework.expands: error
  136. system: debug
  137. org.jetlinks.rule.engine: warn
  138. org.jetlinks.supports.event: warn
  139. org.springframework: warn
  140. org.jetlinks.community.device.message.writer: warn
  141. org.jetlinks.community.elastic.search.service: warn
  142. org.jetlinks.community.elastic.search.service.reactive: warn
  143. org.jetlinks.community.network: warn
  144. io.vertx.mqtt.impl: warn
  145. org.springframework.data.elasticsearch.client: trace
  146. # org.elasticsearch: error
  147. org.jetlinks.pro.influx: warn
  148. org.elasticsearch: error
  149. config: classpath:logback-spring.xml
  150. vertx:
  151. max-event-loop-execute-time-unit: seconds
  152. max-event-loop-execute-time: 30
  153. max-worker-execute-time-unit: seconds
  154. max-worker-execute-time: 30
  155. prefer-native-transport: true
  156. micrometer:
  157. time-series:
  158. tags:
  159. server: ${spring.application.name}
  160. metrics:
  161. default:
  162. step: 30s
  163. management:
  164. health:
  165. elasticsearch:
  166. enabled: false # 关闭elasticsearch健康检查
  167. springdoc:
  168. swagger-ui:
  169. path: /swagger-ui.html
  170. group-configs:
  171. - group: 固件升级相关接口
  172. packages-to-scan:
  173. - org.jetlinks.community.device.web
  174. paths-to-match:
  175. - /device-firmware/**
  176. - /firmware/upgrade/task/**
  177. - /firmware/upgrade/history/**
  178. - group: 云云对接相关接口
  179. packages-to-scan:
  180. - org.jetlinks.community.bridge.web
  181. - group: 设备管理相关接口
  182. packages-to-scan:
  183. - org.jetlinks.community.device
  184. paths-to-exclude:
  185. - /device-instance/**
  186. - /device-product/**
  187. - /protocol/**
  188. - group: 规则引擎相关接口
  189. packages-to-scan: org.jetlinks.community.rule.engine.web
  190. paths-to-exclude: /api/**
  191. - group: 通知管理相关接口
  192. packages-to-scan: org.jetlinks.community.notify.manager.web
  193. - group: 设备接入相关接口
  194. packages-to-scan:
  195. - org.jetlinks.community.network.manager.web
  196. - org.jetlinks.community.device.web
  197. paths-to-match:
  198. - /gateway/**
  199. - /network/**
  200. - /protocol/**
  201. - group: 系统管理相关接口
  202. packages-to-scan:
  203. - org.jetlinks.community.auth
  204. - org.hswebframework.web.system.authorization.defaults.webflux
  205. - org.hswebframework.web.file
  206. - org.hswebframework.web.authorization.basic.web
  207. - org.jetlinks.community.logging.controller
  208. - group: 可视化相关接口
  209. packages-to-scan:
  210. - org.jetlinks.community.visualization.web
  211. paths-to-match:
  212. - /visualization/**
  213. - /visualization/catalog/**
  214. cache:
  215. disabled: true
  216. visual:
  217. base-path: "http://127.0.0.1:8844"
  218. urls:
  219. big-screen-path: "http://192.168.104.115:9022/"
  220. vis-configuration: "http://192.168.104.115:9022/"