拓恒统一网关服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

application-local.yml 7.2KB

2 jaren geleden
2 jaren geleden
2 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. spring:
  2. security:
  3. oauth2:
  4. resource-server:
  5. jwt:
  6. issuer-uri: http://127.0.0.1:8090
  7. cloud:
  8. consul:
  9. host: 127.0.0.1 # consul 所在服务地址
  10. port: 8500 # consul 服务端口
  11. discovery:
  12. enabled: true #默认true。Consul Discovery Client是否注册到注册中心。和register同时设置成false,就不需要起consul服务。
  13. register: true #是否将服务注册到Consul集群中心.。这个参数和上面的enabled参数同时设置成false,应用才不会注册注册中心,才可以不起consul服务!
  14. deregister: true #默认true,服务停止时注销服务,即从服务列表中删除。设置成false的话,???
  15. ## consul ip地址
  16. hostname: 127.0.0.1
  17. # 注册到consul的服务名称
  18. service-name: ${spring.application.name} # 服务提供者名称,注册在consul上面的名字,在consul的调用中,是通过此名字调用的。默认服务名,不要改
  19. instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}:${server.port} #实例ID
  20. heartbeat:
  21. enabled: true
  22. prefer-ip-address: true #表示注册时使用IP而不是hostname
  23. health-check-path: /actuator/health #健康检查
  24. health-check-interval: 10s #配置 Consul 健康检查频率,也就是心跳频率。
  25. health-check-timeout: 10s #健康检查超时
  26. gateway:
  27. discovery:
  28. locator:
  29. lowerCaseServiceId: true
  30. enabled: true
  31. # 跨域设置
  32. globalcors:
  33. add-to-simple-url-handler-mapping: true
  34. cors-configurations:
  35. '[/**]':
  36. allowedOrigins:
  37. - "http://localhost:8001"
  38. allowedMethods:
  39. - "GET"
  40. - "POST"
  41. - "DELETE"
  42. - "PUT"
  43. - "OPTIONS"
  44. allowedHeaders: "*"
  45. allowCredentials: true
  46. maxAge: 360000
  47. routes:
  48. # 认证中心
  49. - id: tuoheng-auth
  50. # 使用lb协议,tuoheng-auth是服务名
  51. uri: lb://tuoheng-auth
  52. # 断言
  53. predicates:
  54. - Path=/api/auth/**
  55. # 去掉前缀前两级
  56. filters:
  57. - StripPrefix=2
  58. # 系统模块
  59. - id: tuoheng-dsp-system
  60. uri: lb://tuoheng-dsp-system
  61. predicates:
  62. - Path=/api/system/**
  63. filters:
  64. - StripPrefix=2
  65. # 代码生成器
  66. - id: tuoheng-generator
  67. uri: lb://tuoheng-generator
  68. predicates:
  69. - Path=/api/generator/**
  70. filters:
  71. - StripPrefix=2
  72. # 后台管理
  73. - id: tuoheng-admin
  74. uri: lb://tuoheng-admin
  75. predicates:
  76. - Path=/api/admin/**
  77. filters:
  78. - StripPrefix=2
  79. # - name: Hystrix
  80. # args:
  81. # name: fallbackcmd
  82. # fallbackUri: forward:/fallback
  83. # 网站服务
  84. - id: tuoheng-portal
  85. uri: lb://tuoheng-portal
  86. predicates:
  87. - Path=/api/portal/**
  88. filters:
  89. - StripPrefix=2
  90. # DSP小程序服务
  91. - id: tuoheng-dsp-miniprogram
  92. uri: lb://tuoheng-dsp-miniprogram
  93. predicates:
  94. - Path=/api/miniprogram/**
  95. filters:
  96. - StripPrefix=2
  97. # DSP api服务
  98. - id: tuoheng-dsp-api
  99. uri: lb://tuoheng-dsp-api
  100. predicates:
  101. - Path=/api/web/**
  102. filters:
  103. - StripPrefix=2
  104. # DSP 巡检云
  105. - id: tuoheng-dsp-inspection
  106. uri: lb://tuoheng-dsp-inspection
  107. predicates:
  108. - Path=/api/inspection/**
  109. filters:
  110. - StripPrefix=2
  111. # dsp component服务
  112. - id: tuoheng-dsp-component
  113. uri: lb://tuoheng-dsp-component
  114. predicates:
  115. - Path=/api/component/**
  116. filters:
  117. - StripPrefix=2
  118. # pilot后台管理
  119. - id: tuoheng-pilot-admin
  120. uri: lb://tuoheng-pilot-admin
  121. predicates:
  122. - Path=/pilot/admin/**
  123. filters:
  124. - StripPrefix=2
  125. # pilot小程序服务
  126. - id: tuoheng-pilot-miniprogram
  127. uri: lb://tuoheng-pilot-miniprogram
  128. predicates:
  129. - Path=/pilot/miniprogram/**
  130. filters:
  131. - StripPrefix=2
  132. # pilot api服务
  133. - id: tuoheng-pilot-api
  134. uri: lb://tuoheng-pilot-api
  135. predicates:
  136. - Path=/pilot/web/**
  137. filters:
  138. - StripPrefix=2
  139. # freeway后台管理
  140. - id: tuoheng-freeway-admin
  141. uri: lb://tuoheng-freeway-admin
  142. predicates:
  143. - Path=/freeway/admin/**
  144. filters:
  145. - StripPrefix=2
  146. # freeway小程序服务
  147. - id: tuoheng-freeway-miniprogram
  148. uri: lb://tuoheng-freeway-miniprogram
  149. predicates:
  150. - Path=/freeway/miniprogram/**
  151. filters:
  152. - StripPrefix=2
  153. # freeway api服务
  154. - id: tuoheng-freeway-api
  155. uri: lb://tuoheng-freeway-api
  156. predicates:
  157. - Path=/freeway/web/**
  158. filters:
  159. - StripPrefix=2
  160. # oidc admin服务
  161. - id: tuoheng-oidc-admin
  162. uri: lb://tuoheng-oidc-admin
  163. predicates:
  164. - Path=/oidc/admin/**
  165. filters:
  166. - StripPrefix=2
  167. # hhz admin服务
  168. - id: tuoheng-hhz-admin
  169. uri: lb://tuoheng-hhz-admin
  170. predicates:
  171. - Path=/hhz/admin/**
  172. filters:
  173. - StripPrefix=2
  174. # hhz 小程序服务
  175. - id: tuoheng-hhz-api
  176. uri: lb://tuoheng-hhz-api
  177. predicates:
  178. - Path=/hhz/api/**
  179. filters:
  180. - StripPrefix=2
  181. # 机场平台 platform服务
  182. - id: tuoheng_airport_admin
  183. uri: lb://tuoheng-airport-admin
  184. predicates:
  185. - Path=/airport/admin/**
  186. filters:
  187. - StripPrefix=2
  188. # Redis数据源
  189. redis:
  190. # 缓存库默认索引0
  191. database: 0
  192. # Redis服务器地址
  193. host: 192.168.11.13
  194. # Redis服务器连接端口
  195. port: 6379
  196. # Redis服务器连接密码(默认为空)
  197. password:
  198. # 连接超时时间(毫秒)
  199. timeout: 6000
  200. # 默认的数据过期时间,主要用于shiro权限管理
  201. expire: 2592000
  202. jedis:
  203. pool:
  204. max-active: 1000 # 连接池最大连接数(使用负值表示没有限制)
  205. max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
  206. max-idle: 10 # 连接池中的最大空闲连接
  207. min-idle: 1 # 连接池中的最小空闲连接
  208. #security放行白名单配置
  209. security:
  210. ignore:
  211. permitUrls: /api/system/demo/msg
  212. oauthUrls: /api/system/demo/hello,/api/*/serviceInst/*/getServiceInstParam/*,/api/*/serviceInst/*/getServiceInstCaseUrl/*,/api/*/serviceInst/*/*/application,/api/*/serviceInst/*/*/questionList
  213. # 获取 apiUrl 可访问的 roleIdList
  214. tuoheng:
  215. hhz-admin-perUrl: http://127.0.0.1:9055/api/permission/getRoleIdList
  216. freeway-admin-perUrl: http://192.168.11.11:9117/permission/getRoleIdList
  217. waterway-admin-perUrl: http://192.168.11.11:9120/permission/getRoleIdList