# # Copyright 2016-present the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # server: #服务器配置 port: 9309 undertow: threads: io: 2 worker: 20 buffer-size: 512 grpc: client: dc3-center-auth: enable-keep-alive: true keep-alive-without-calls: true negotiation-type: plaintext spring: application: name: dc3-gateway profiles: active: - ${NODE_ENV:dev} transaction: rollback-on-commit-failure: true main: allow-bean-definition-overriding: true mvc: throw-exception-if-no-handler-found: true web: resources: add-mappings: false redis: database: 0 cache: redis: time-to-live: ${CACHE_REDIS_TIME_TO_LIVE:12H} cloud: gateway: loadbalancer: use404: true discovery: locator: enabled: true lower-case-service-id: true routes: # auth token - id: auth_route_token uri: lb://dc3-center-auth predicates: - Path=/api/v3/auth/token/** filters: - StripPrefix=2 - name: RequestRateLimiter args: key-resolver: '#{@hostKeyResolver}' redis-rate-limiter.replenishRate: 10 redis-rate-limiter.burstCapacity: 20 #- name: CircuitBreaker # args: # name: default # fallbackUri: 'forward:/fallback' # auth other - id: auth_route_other uri: lb://dc3-center-auth predicates: - Path=/api/v3/auth/user/**,/api/v3/auth/black_ip/**,/api/v3/auth/tenant/**,/api/v3/auth/dictionary/** filters: - StripPrefix=2 - Authentic - name: RequestRateLimiter args: key-resolver: '#{@hostKeyResolver}' redis-rate-limiter.replenishRate: 10 redis-rate-limiter.burstCapacity: 20 #- name: CircuitBreaker # args: # name: default # fallbackUri: 'forward:/fallback' # manager - id: manager_route uri: lb://dc3-center-manager predicates: - Path=/api/v3/manager/** filters: - StripPrefix=2 - Authentic - name: RequestRateLimiter args: key-resolver: '#{@hostKeyResolver}' redis-rate-limiter.replenishRate: 10 redis-rate-limiter.burstCapacity: 20 #- name: CircuitBreaker # args: # name: default # fallbackUri: 'forward:/fallback' # data - id: data_route uri: lb://dc3-center-data predicates: - Path=/api/v3/data/** filters: - StripPrefix=2 - Authentic - name: RequestRateLimiter args: key-resolver: '#{@hostKeyResolver}' redis-rate-limiter.replenishRate: 10 redis-rate-limiter.burstCapacity: 20 #- name: CircuitBreaker # args: # name: default # fallbackUri: 'forward:/fallback' datasource: driver-class-name: org.postgis.DriverWrapper jdbc-url: jdbc:postgresql_postGIS://192.168.0.4:5432/watersmart?useSSL=false&useAffectedRows=false&allowMultiQueries=true username: postgres password: kpr.23417.postgres data: maximum-pool-size: 200 validation-query: SELECT 1 connection-test-query: SELECT 1 test-on-return: false idle-timeout: 30000 connection-timeout: 30000 jpa: show-sql: false logging: level: io.github.pnoker: DEBUG file: name: dc3/logs/gateway/${spring.application.name}.log #许昌八百支户表相关参数配置,密码为MD532位大写前二十位 xuchang: user: zzsfy pwd: D41D8CD98F00B204E980 url: http://42.227.69.38:8004/WebServiceOfNBIoT.asmx #当阳influxdb配置 dangyang: #influxdb相关配置 inluxdb: database: iot_test # serverUrl: http://192.168.0.4:8086 # username: kpr # password: kpr.2024dy.influxdb serverUrl: http://127.0.0.1:8086 username: admin password: yourpassword #设备数据相关接口地址 http: username: shkpr password: shkpr token: http://192.168.0.9:48085/admin-api/system/auth/login realtimeDataList: http://192.168.0.9:48085/admin-api/data/device/realtimeDataList hisDataList: http://192.168.0.9:48085/admin-api/data/device/hisDataList list: http://192.168.0.9:48085/admin-api/data/device/list #设备类型列表配置 device: type: > [{ "key": "FLOW_METER", "name": "流量计" }, { "key": "WATER_QUALITY", "name": "水质仪" }, { "key": "WATER_PUMP", "name": "水泵" }, { "key": "WATER_METER", "name": "水表" }, { "key": "PRESS_METER", "name": "压力计" }, { "key": "LIQUID_LEVEL_METER", "name": "液位计" }, { "key": "ELEC_CTRL_VALVE", "name": "电控阀" }] #当阳远程物联网接口返回字段信息 ___后跟的是自己的字段 watermeter: ftotal___flow_total_pos,rtotal___flow_total_rev,flow___flow_cur,press___press_cur,soc___battery flowmeter: ftotal___flow_total_pos,rtotal___flow_total_rev,flow___flow_cur,speed___flow_speed,alarm___alarm,csq___csq,press___press_cur pressmeter: press___press_cur waterquality: ph___ph,wd___dev_temperature,yl___chlorine,zd___turbidity waterpump: power___power,currentA___ia,currentB___ib,currentC___ic,voltageA___ua,voltageB___ub,voltageC___uc,soc___battery,dn___quantity,runTime,runFrequency___frequency 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 liquidlevelmeter: level___level WATER_METER: WaterMeter FLOW_METER: WaterMeter PRESS_METER: WaterMeter WATER_QUALITY: WaterQuality WATER_PUMP: WaterPump ELEC_CTRL_VALVE: ValveMeter LIQUID_LEVEL_METER: LiquidLevel