application.yml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. #
  2. # Copyright 2016-present the original author or authors.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # https://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. server:
  17. #服务器配置
  18. port: 9309
  19. undertow:
  20. threads:
  21. io: 2
  22. worker: 20
  23. buffer-size: 512
  24. grpc:
  25. client:
  26. dc3-center-auth:
  27. enable-keep-alive: true
  28. keep-alive-without-calls: true
  29. negotiation-type: plaintext
  30. spring:
  31. application:
  32. name: dc3-gateway
  33. profiles:
  34. active:
  35. - ${NODE_ENV:dev}
  36. transaction:
  37. rollback-on-commit-failure: true
  38. main:
  39. allow-bean-definition-overriding: true
  40. mvc:
  41. throw-exception-if-no-handler-found: true
  42. web:
  43. resources:
  44. add-mappings: false
  45. redis:
  46. database: 0
  47. cache:
  48. redis:
  49. time-to-live: ${CACHE_REDIS_TIME_TO_LIVE:12H}
  50. cloud:
  51. gateway:
  52. loadbalancer:
  53. use404: true
  54. discovery:
  55. locator:
  56. enabled: true
  57. lower-case-service-id: true
  58. routes:
  59. # auth token
  60. - id: auth_route_token
  61. uri: lb://dc3-center-auth
  62. predicates:
  63. - Path=/api/v3/auth/token/**
  64. filters:
  65. - StripPrefix=2
  66. - name: RequestRateLimiter
  67. args:
  68. key-resolver: '#{@hostKeyResolver}'
  69. redis-rate-limiter.replenishRate: 10
  70. redis-rate-limiter.burstCapacity: 20
  71. #- name: CircuitBreaker
  72. # args:
  73. # name: default
  74. # fallbackUri: 'forward:/fallback'
  75. # auth other
  76. - id: auth_route_other
  77. uri: lb://dc3-center-auth
  78. predicates:
  79. - Path=/api/v3/auth/user/**,/api/v3/auth/black_ip/**,/api/v3/auth/tenant/**,/api/v3/auth/dictionary/**
  80. filters:
  81. - StripPrefix=2
  82. - Authentic
  83. - name: RequestRateLimiter
  84. args:
  85. key-resolver: '#{@hostKeyResolver}'
  86. redis-rate-limiter.replenishRate: 10
  87. redis-rate-limiter.burstCapacity: 20
  88. #- name: CircuitBreaker
  89. # args:
  90. # name: default
  91. # fallbackUri: 'forward:/fallback'
  92. # manager
  93. - id: manager_route
  94. uri: lb://dc3-center-manager
  95. predicates:
  96. - Path=/api/v3/manager/**
  97. filters:
  98. - StripPrefix=2
  99. - Authentic
  100. - name: RequestRateLimiter
  101. args:
  102. key-resolver: '#{@hostKeyResolver}'
  103. redis-rate-limiter.replenishRate: 10
  104. redis-rate-limiter.burstCapacity: 20
  105. #- name: CircuitBreaker
  106. # args:
  107. # name: default
  108. # fallbackUri: 'forward:/fallback'
  109. # data
  110. - id: data_route
  111. uri: lb://dc3-center-data
  112. predicates:
  113. - Path=/api/v3/data/**
  114. filters:
  115. - StripPrefix=2
  116. - Authentic
  117. - name: RequestRateLimiter
  118. args:
  119. key-resolver: '#{@hostKeyResolver}'
  120. redis-rate-limiter.replenishRate: 10
  121. redis-rate-limiter.burstCapacity: 20
  122. #- name: CircuitBreaker
  123. # args:
  124. # name: default
  125. # fallbackUri: 'forward:/fallback'
  126. datasource:
  127. driver-class-name: org.postgis.DriverWrapper
  128. jdbc-url: jdbc:postgresql_postGIS://192.168.0.4:5432/watersmart?useSSL=false&useAffectedRows=false&allowMultiQueries=true
  129. username: postgres
  130. password: kpr.23417.postgres
  131. data:
  132. maximum-pool-size: 200
  133. validation-query: SELECT 1
  134. connection-test-query: SELECT 1
  135. test-on-return: false
  136. idle-timeout: 30000
  137. connection-timeout: 30000
  138. jpa:
  139. show-sql: false
  140. logging:
  141. level:
  142. io.github.pnoker: DEBUG
  143. file:
  144. name: dc3/logs/gateway/${spring.application.name}.log
  145. #许昌八百支户表相关参数配置,密码为MD532位大写前二十位
  146. xuchang:
  147. user: zzsfy
  148. pwd: D41D8CD98F00B204E980
  149. url: http://42.227.69.38:8004/WebServiceOfNBIoT.asmx
  150. #当阳influxdb配置
  151. dangyang:
  152. #influxdb相关配置
  153. inluxdb:
  154. database: iot_test
  155. # serverUrl: http://192.168.0.4:8086
  156. # username: kpr
  157. # password: kpr.2024dy.influxdb
  158. serverUrl: http://127.0.0.1:8086
  159. username: admin
  160. password: yourpassword
  161. #设备数据相关接口地址
  162. http:
  163. username: shkpr
  164. password: shkpr
  165. token: http://192.168.0.9:48085/admin-api/system/auth/login
  166. realtimeDataList: http://192.168.0.9:48085/admin-api/data/device/realtimeDataList
  167. hisDataList: http://192.168.0.9:48085/admin-api/data/device/hisDataList
  168. list: http://192.168.0.9:48085/admin-api/data/device/list
  169. #设备类型列表配置
  170. device:
  171. type: >
  172. [{
  173. "key": "FLOW_METER",
  174. "name": "流量计"
  175. }, {
  176. "key": "WATER_QUALITY",
  177. "name": "水质仪"
  178. }, {
  179. "key": "WATER_PUMP",
  180. "name": "水泵"
  181. }, {
  182. "key": "WATER_METER",
  183. "name": "水表"
  184. }, {
  185. "key": "PRESS_METER",
  186. "name": "压力计"
  187. }, {
  188. "key": "LIQUID_LEVEL_METER",
  189. "name": "液位计"
  190. }, {
  191. "key": "ELEC_CTRL_VALVE",
  192. "name": "电控阀"
  193. }]
  194. #当阳远程物联网接口返回字段信息 ___后跟的是自己的字段
  195. watermeter: ftotal___flow_total_pos,rtotal___flow_total_rev,flow___flow_cur,press___press_cur,soc___battery
  196. flowmeter: ftotal___flow_total_pos,rtotal___flow_total_rev,flow___flow_cur,speed___flow_speed,alarm___alarm,csq___csq,press___press_cur
  197. pressmeter: press___press_cur
  198. waterquality: ph___ph,wd___dev_temperature,yl___chlorine,zd___turbidity
  199. waterpump: power___power,currentA___ia,currentB___ib,currentC___ic,voltageA___ua,voltageB___ub,voltageC___uc,soc___battery,dn___quantity,runTime,runFrequency___frequency
  200. elecctrlvalve: RP16___battery_voltage,RW01___flow_total_pos,RW03___flow_speed,RW02___flow_cur,rp16___battery_voltage,rw01___flow_total_pos,rw03___flow_speed,rw02___flow_cur
  201. liquidlevelmeter: level___level
  202. WATER_METER: WaterMeter
  203. FLOW_METER: WaterMeter
  204. PRESS_METER: WaterMeter
  205. WATER_QUALITY: WaterQuality
  206. WATER_PUMP: WaterPump
  207. ELEC_CTRL_VALVE: ValveMeter
  208. LIQUID_LEVEL_METER: LiquidLevel