application.yml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  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: 8000
  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: @project.artifactId@
  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. jdbc-url: jdbc:postgresql_postGIS://140.246.183.164:5432/water_smart_develop_branch?useSSL=false&useAffectedRows=false&allowMultiQueries=true
  130. username: postgres
  131. password: kpr.23417.postgres
  132. data:
  133. maximum-pool-size: 200
  134. validation-query: SELECT 1
  135. connection-test-query: SELECT 1
  136. test-on-return: false
  137. idle-timeout: 30000
  138. connection-timeout: 30000
  139. jpa:
  140. show-sql: false
  141. logging:
  142. level:
  143. io.github.pnoker: DEBUG
  144. file:
  145. name: dc3/logs/gateway/${spring.application.name}.log
  146. #许昌八百支户表相关参数配置,密码为MD532位大写前二十位
  147. xuchang:
  148. user: zzsfy
  149. pwd: D41D8CD98F00B204E980
  150. url: http://42.227.69.38:8004/WebServiceOfNBIoT.asmx
  151. #当阳influxdb配置
  152. dangyang:
  153. #influxdb相关配置
  154. inluxdb:
  155. database: iot_test
  156. # database: iot
  157. serverUrl: http://192.168.0.4:8086
  158. username: kpr
  159. password: kpr.2024dy.influxdb
  160. # serverUrl: http://127.0.0.1:8086
  161. # username: admin
  162. # password: yourpassword
  163. #设备数据相关接口地址
  164. http:
  165. username: shkpr
  166. password: shkpr
  167. token: http://192.168.0.9:48085/admin-api/system/auth/login
  168. realtimeDataList: http://192.168.0.9:48085/admin-api/data/device/realtimeDataList
  169. hisDataList: http://192.168.0.9:48085/admin-api/data/device/hisDataList
  170. list: http://192.168.0.9:48085/admin-api/data/device/list
  171. #设备类型列表配置
  172. device:
  173. type: >
  174. [{
  175. "key": "FLOW_METER",
  176. "name": "流量计"
  177. }, {
  178. "key": "WATER_QUALITY",
  179. "name": "水质仪"
  180. }, {
  181. "key": "WATER_PUMP",
  182. "name": "水泵"
  183. }, {
  184. "key": "WATER_METER",
  185. "name": "水表"
  186. }, {
  187. "key": "PRESS_METER",
  188. "name": "压力计"
  189. }, {
  190. "key": "LIQUID_LEVEL_METER",
  191. "name": "液位计"
  192. }, {
  193. "key": "ELEC_CTRL_VALVE",
  194. "name": "电控阀"
  195. }]
  196. #当阳远程物联网接口返回字段信息 ___后跟的是自己的字段
  197. watermeter: ftotal___flow_total_pos,rtotal___flow_total_rev,flow___flow_cur,press___press_cur,soc___battery
  198. flowmeter: ftotal___flow_total_pos,rtotal___flow_total_rev,flow___flow_cur,speed___flow_speed,alarm___alarm,csq___csq,press___press_cur
  199. pressmeter: press___press_cur
  200. waterquality: ph___ph,wd___dev_temperature,yl___chlorine,zd___turbidity
  201. waterpump: power___power,currentA___ia,currentB___ib,currentC___ic,voltageA___ua,voltageB___ub,voltageC___uc,soc___battery,dn___quantity,runTime,runFrequency___frequency
  202. 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
  203. liquidlevelmeter: level___level
  204. WATER_METER: WaterMeter
  205. FLOW_METER: WaterMeter
  206. PRESS_METER: WaterMeter
  207. WATER_QUALITY: WaterQuality
  208. WATER_PUMP: WaterPump
  209. ELEC_CTRL_VALVE: ValveMeter
  210. LIQUID_LEVEL_METER: LiquidLevel
  211. #江津influxdb配置
  212. jiangjin:
  213. #influxdb相关配置
  214. inluxdb:
  215. database: iot_test
  216. # database: iot
  217. serverUrl: http://10.101.16.13:8086
  218. # username: kpr
  219. # password: kpr.2024dy.influxdb