application.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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: 127.0.0.1
  18. port: 6379
  19. lettuce:
  20. pool:
  21. max-active: 1024
  22. timeout: 20s
  23. # max-wait: 10s
  24. r2dbc:
  25. url: r2dbc:postgresql://localhost:5432/jetlinks
  26. username: postgres
  27. password: jetlinks
  28. pool:
  29. max-size: 32
  30. easyorm:
  31. default-schema: public # 数据库默认的schema
  32. dialect: postgres #数据库方言
  33. elasticsearch:
  34. client:
  35. host: localhost
  36. port: 9200
  37. max-conn-total: 128
  38. connect-timeout: 5000
  39. socket-timeout: 5000
  40. connection-request-timeout: 8000
  41. device:
  42. message:
  43. writer:
  44. time-series:
  45. enabled: true #写出设备消息数据到elasticsearch
  46. hsweb:
  47. cors:
  48. enable: true
  49. configs:
  50. - path: /**
  51. allowed-headers: "*"
  52. allowed-methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]
  53. allowed-origins: ["*"]
  54. allow-credentials: true
  55. max-age: 1800
  56. dict:
  57. enum-packages: org.jetlinks
  58. file:
  59. upload:
  60. static-file-path: ./static/upload
  61. static-location: http://localhost:8848/upload
  62. webflux:
  63. response-wrapper: enabled #开启响应包装器(将返回值包装为ResponseMessage)
  64. # auth: #默认的用户配置
  65. # users:
  66. # admin:
  67. # username: admin
  68. # password: admin
  69. # name: 超级管理员
  70. authorize:
  71. auto-parse: true
  72. cache:
  73. type: redis
  74. redis:
  75. local-cache-type: guava
  76. jetlinks:
  77. server-id: ${spring.application.name}:${server.port} #设备服务网关服务ID,不同服务请设置不同的ID
  78. logging:
  79. system:
  80. context:
  81. server: ${spring.application.name}
  82. logging:
  83. level:
  84. org.jetlinks: debug
  85. rule.engine: warn
  86. org.hswebframework: debug
  87. org.springframework.transaction: debug
  88. # org.springframework.data.r2dbc.connectionfactory: debug
  89. io.micrometer: warn
  90. org.hswebframework.expands: error
  91. system: debug
  92. org.jetlinks.rule.engine: warn
  93. org.jetlinks.gateway: debug
  94. org.springframework: warn
  95. vertx:
  96. max-event-loop-execute-time-unit: seconds
  97. max-event-loop-execute-time: 30
  98. max-worker-execute-time-unit: seconds
  99. max-worker-execute-time: 30
  100. prefer-native-transport: true
  101. micrometer:
  102. time-series:
  103. tags:
  104. server: ${spring.application.name}
  105. metrics:
  106. default:
  107. step: 30s