|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- spring:
- security:
- oauth2:
- resource-server:
- jwt:
- issuer-uri: http://127.0.0.1:8090
- cloud:
- consul:
- host: 127.0.0.1 # consul 所在服务地址
- port: 8500 # consul 服务端口
- discovery:
- enabled: true #默认true。Consul Discovery Client是否注册到注册中心。和register同时设置成false,就不需要起consul服务。
- register: true #是否将服务注册到Consul集群中心.。这个参数和上面的enabled参数同时设置成false,应用才不会注册注册中心,才可以不起consul服务!
- deregister: true #默认true,服务停止时注销服务,即从服务列表中删除。设置成false的话,???
- ## consul ip地址
- hostname: 127.0.0.1
- # 注册到consul的服务名称
- service-name: ${spring.application.name} # 服务提供者名称,注册在consul上面的名字,在consul的调用中,是通过此名字调用的。默认服务名,不要改
- instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}:${server.port} #实例ID
- heartbeat:
- enabled: true
- prefer-ip-address: true #表示注册时使用IP而不是hostname
- health-check-path: /actuator/health #健康检查
- health-check-interval: 10s #配置 Consul 健康检查频率,也就是心跳频率。
- health-check-timeout: 10s #健康检查超时
- gateway:
- discovery:
- locator:
- lowerCaseServiceId: true
- enabled: true
- # 跨域设置
- globalcors:
- add-to-simple-url-handler-mapping: true
- cors-configurations:
- '[/**]':
- allowedOrigins:
- - "http://localhost:8001"
- allowedMethods:
- - "GET"
- - "POST"
- - "DELETE"
- - "PUT"
- - "OPTIONS"
- allowedHeaders: "*"
- allowCredentials: true
- maxAge: 360000
- routes:
- # 认证中心
- - id: tuoheng-auth
- # 使用lb协议,tuoheng-auth是服务名
- uri: lb://tuoheng-auth
- # 断言
- predicates:
- - Path=/api/auth/**
- # 去掉前缀前两级
- filters:
- - StripPrefix=2
- # 系统模块
- - id: tuoheng-dsp-system
- uri: lb://tuoheng-dsp-system
- predicates:
- - Path=/api/system/**
- filters:
- - StripPrefix=2
- # 代码生成器
- - id: tuoheng-generator
- uri: lb://tuoheng-generator
- predicates:
- - Path=/api/generator/**
- filters:
- - StripPrefix=2
- # 后台管理
- - id: tuoheng-admin
- uri: lb://tuoheng-admin
- predicates:
- - Path=/api/admin/**
- filters:
- - StripPrefix=2
- # - name: Hystrix
- # args:
- # name: fallbackcmd
- # fallbackUri: forward:/fallback
- # 网站服务
- - id: tuoheng-portal
- uri: lb://tuoheng-portal
- predicates:
- - Path=/api/portal/**
- filters:
- - StripPrefix=2
- # DSP小程序服务
- - id: tuoheng-dsp-miniprogram
- uri: lb://tuoheng-dsp-miniprogram
- predicates:
- - Path=/api/miniprogram/**
- filters:
- - StripPrefix=2
- # DSP api服务
- - id: tuoheng-dsp-api
- uri: lb://tuoheng-dsp-api
- predicates:
- - Path=/api/web/**
- filters:
- - StripPrefix=2
- # DSP 巡检云
- - id: tuoheng-dsp-inspection
- uri: lb://tuoheng-dsp-inspection
- predicates:
- - Path=/api/inspection/**
- filters:
- - StripPrefix=2
- # dsp component服务
- - id: tuoheng-dsp-component
- uri: lb://tuoheng-dsp-component
- predicates:
- - Path=/api/component/**
- filters:
- - StripPrefix=2
- # pilot后台管理
- - id: tuoheng-pilot-admin
- uri: lb://tuoheng-pilot-admin
- predicates:
- - Path=/pilot/admin/**
- filters:
- - StripPrefix=2
- # pilot小程序服务
- - id: tuoheng-pilot-miniprogram
- uri: lb://tuoheng-pilot-miniprogram
- predicates:
- - Path=/pilot/miniprogram/**
- filters:
- - StripPrefix=2
- # pilot api服务
- - id: tuoheng-pilot-api
- uri: lb://tuoheng-pilot-api
- predicates:
- - Path=/pilot/web/**
- filters:
- - StripPrefix=2
- # freeway后台管理
- - id: tuoheng-freeway-admin
- uri: lb://tuoheng-freeway-admin
- predicates:
- - Path=/freeway/admin/**
- filters:
- - StripPrefix=2
- # freeway小程序服务
- - id: tuoheng-freeway-miniprogram
- uri: lb://tuoheng-freeway-miniprogram
- predicates:
- - Path=/freeway/miniprogram/**
- filters:
- - StripPrefix=2
- # freeway api服务
- - id: tuoheng-freeway-api
- uri: lb://tuoheng-freeway-api
- predicates:
- - Path=/freeway/web/**
- filters:
- - StripPrefix=2
- # oidc admin服务
- - id: tuoheng-oidc-admin
- uri: lb://tuoheng-oidc-admin
- predicates:
- - Path=/oidc/admin/**
- filters:
- - StripPrefix=2
- # hhz admin服务
- - id: tuoheng-hhz-admin
- uri: lb://tuoheng-hhz-admin
- predicates:
- - Path=/hhz/admin/**
- filters:
- - StripPrefix=2
- # hhz 小程序服务
- - id: tuoheng-hhz-api
- uri: lb://tuoheng-hhz-api
- predicates:
- - Path=/hhz/api/**
- filters:
- - StripPrefix=2
- # 机场平台 platform服务
- - id: tuoheng_airport_admin
- uri: lb://tuoheng-airport-admin
- predicates:
- - Path=/airport/admin/**
- filters:
- - StripPrefix=2
- # Redis数据源
- redis:
- # 缓存库默认索引0
- database: 0
- # Redis服务器地址
- host: 192.168.11.13
- # Redis服务器连接端口
- port: 6379
- # Redis服务器连接密码(默认为空)
- password:
- # 连接超时时间(毫秒)
- timeout: 6000
- # 默认的数据过期时间,主要用于shiro权限管理
- expire: 2592000
- jedis:
- pool:
- max-active: 1000 # 连接池最大连接数(使用负值表示没有限制)
- max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
- max-idle: 10 # 连接池中的最大空闲连接
- min-idle: 1 # 连接池中的最小空闲连接
- #security放行白名单配置
- security:
- ignore:
- permitUrls: /api/system/demo/msg
- oauthUrls: /api/system/demo/hello,/api/*/serviceInst/*/getServiceInstParam/*,/api/*/serviceInst/*/getServiceInstCaseUrl/*,/api/*/serviceInst/*/*/application,/api/*/serviceInst/*/*/questionList
-
- # 获取 apiUrl 可访问的 roleIdList
- tuoheng:
- hhz-admin-perUrl: http://127.0.0.1:9055/api/permission/getRoleIdList
- freeway-admin-perUrl: http://192.168.11.11:9117/permission/getRoleIdList
- waterway-admin-perUrl: http://192.168.11.11:9120/permission/getRoleIdList
|