拓恒统一网关服务
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

266 rindas
9.2KB

  1. spring:
  2. security:
  3. oauth2:
  4. resource-server:
  5. jwt:
  6. issuer-uri: https://oidc.t-aaron.com
  7. cloud:
  8. consul:
  9. host: 172.16.5.12 # 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: 172.16.5.12
  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. httpclient:
  28. websocket:
  29. max-frame-payload-length: 10485760 # 单次通信提交最大数据库设置成10MB
  30. discovery:
  31. locator:
  32. lowerCaseServiceId: true
  33. enabled: true
  34. # 跨域设置
  35. globalcors:
  36. add-to-simple-url-handler-mapping: true
  37. cors-configurations:
  38. '[/**]':
  39. allowedOrigins:
  40. - "http://localhost:8001"
  41. allowedMethods:
  42. - "GET"
  43. - "POST"
  44. - "DELETE"
  45. - "PUT"
  46. - "OPTIONS"
  47. allowedHeaders: "*"
  48. allowCredentials: true
  49. maxAge: 360000
  50. routes:
  51. # 认证中心
  52. - id: tuoheng-auth
  53. uri: lb://tuoheng-auth
  54. predicates:
  55. - Path=/api/auth/**
  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-dsp-admin
  74. uri: lb://tuoheng-dsp-admin
  75. predicates:
  76. - Path=/api/admin/**
  77. filters:
  78. - StripPrefix=2
  79. # 网站服务
  80. - id: tuoheng-dsp-portal
  81. uri: lb://tuoheng-dsp-portal
  82. predicates:
  83. - Path=/api/portal/**
  84. filters:
  85. - StripPrefix=2
  86. # DSP小程序服务
  87. - id: tuoheng-dsp-miniprogram
  88. uri: lb://tuoheng-dsp-miniprogram
  89. predicates:
  90. - Path=/api/miniprogram/**
  91. filters:
  92. - StripPrefix=2
  93. # DSP api服务
  94. - id: tuoheng-dsp-api
  95. uri: lb://tuoheng-dsp-api
  96. predicates:
  97. - Path=/api/web/**
  98. filters:
  99. - StripPrefix=2
  100. # DSP 巡检云
  101. - id: tuoheng-dsp-inspection
  102. uri: lb://tuoheng-dsp-inspection
  103. predicates:
  104. - Path=/api/inspection/**
  105. filters:
  106. - StripPrefix=2
  107. # dsp component服务
  108. - id: tuoheng-dsp-component
  109. uri: lb://tuoheng-dsp-component
  110. predicates:
  111. - Path=/api/component/**
  112. filters:
  113. - StripPrefix=2
  114. # pilot后台管理
  115. - id: tuoheng-pilot-admin
  116. uri: lb://tuoheng-pilot-admin
  117. predicates:
  118. - Path=/pilot/admin/**
  119. filters:
  120. - StripPrefix=2
  121. # pilot小程序服务
  122. - id: tuoheng-pilot-miniprogram
  123. uri: lb://tuoheng-pilot-miniprogram
  124. predicates:
  125. - Path=/pilot/miniprogram/**
  126. filters:
  127. - StripPrefix=2
  128. # pilot api服务
  129. - id: tuoheng-pilot-api
  130. uri: lb://tuoheng-pilot-api
  131. predicates:
  132. - Path=/pilot/web/**
  133. filters:
  134. - StripPrefix=2
  135. # freeway后台管理
  136. - id: tuoheng-freeway-admin
  137. uri: lb://tuoheng-freeway-admin
  138. predicates:
  139. - Path=/freeway/admin/**
  140. filters:
  141. - StripPrefix=2
  142. # freeway小程序服务
  143. - id: tuoheng-freeway-miniprogram
  144. uri: lb://tuoheng-freeway-miniprogram
  145. predicates:
  146. - Path=/freeway/miniprogram/**
  147. filters:
  148. - StripPrefix=2
  149. # freeway api服务
  150. - id: tuoheng-freeway-api
  151. uri: lb://tuoheng-freeway-api
  152. predicates:
  153. - Path=/freeway/web/**
  154. filters:
  155. - StripPrefix=2
  156. # oidc admin服务
  157. - id: tuoheng-oidc-admin
  158. uri: lb://tuoheng-oidc-admin
  159. predicates:
  160. - Path=/oidc/admin/**
  161. filters:
  162. - StripPrefix=2
  163. # hhz admin服务
  164. - id: tuoheng-hhz-admin
  165. uri: lb://tuoheng-hhz-admin
  166. predicates:
  167. - Path=/hhz/admin/**
  168. filters:
  169. - StripPrefix=2
  170. # hhz 小程序服务
  171. - id: tuoheng-hhz-api
  172. uri: lb://tuoheng-hhz-api
  173. predicates:
  174. - Path=/hhz/api/**
  175. filters:
  176. - StripPrefix=2
  177. # waterway后台管理
  178. - id: tuoheng-waterway-admin
  179. uri: lb://tuoheng-waterway-admin
  180. predicates:
  181. - Path=/waterway/admin/**
  182. filters:
  183. - StripPrefix=2
  184. # waterway后台管理 webSocket
  185. - id: tuoheng-waterway-admin-webSocket
  186. uri: lb:ws://tuoheng-waterway-admin
  187. predicates:
  188. - Path=/waterway/socket/**
  189. filters:
  190. - StripPrefix=2
  191. # waterway小程序服务
  192. - id: tuoheng-waterway-miniprogram
  193. uri: lb://tuoheng-waterway-miniprogram
  194. predicates:
  195. - Path=/waterway/miniprogram/**
  196. filters:
  197. - StripPrefix=2
  198. # waterway api服务
  199. - id: tuoheng-waterway-api
  200. uri: lb://tuoheng-waterway-api
  201. predicates:
  202. - Path=/waterway/web/**
  203. filters:
  204. - StripPrefix=2
  205. # 机场平台 platform服务
  206. - id: tuoheng_airport_admin
  207. uri: lb://tuoheng-airport-admin
  208. predicates:
  209. - Path=/airport/admin/**
  210. filters:
  211. - StripPrefix=2
  212. # 电信城管admin服务
  213. - id: tuoheng-telecomumale-admin
  214. uri: lb://tuoheng-telecomumale-admin
  215. predicates:
  216. - Path=/telecomumale/admin/**
  217. filters:
  218. - StripPrefix=2
  219. # 电信城管mp服务
  220. - id: tuoheng-telecomumale-miniprogram
  221. uri: lb://tuoheng-telecomumale-miniprogram
  222. predicates:
  223. - Path=/telecomumale/miniprogram/**
  224. filters:
  225. - StripPrefix=2
  226. # airmonitor admin服务
  227. - id: tuoheng-airmonitor-admin
  228. uri: lb://tuoheng-airmonitor-admin
  229. predicates:
  230. - Path=/airmonitor/admin/**
  231. filters:
  232. - StripPrefix=2
  233. # Redis数据源
  234. redis:
  235. # 缓存库默认索引0
  236. database: 0
  237. # Redis服务器地址
  238. host: r-uf6r5lm7c7sfdv3ehb.redis.rds.aliyuncs.com
  239. # Redis服务器连接端口
  240. port: 6379
  241. # Redis服务器连接密码(默认为空)
  242. password:
  243. # 连接超时时间(毫秒)
  244. timeout: 6000
  245. # 默认的数据过期时间,主要用于shiro权限管理
  246. expire: 2592000
  247. jedis:
  248. pool:
  249. max-active: 1000 # 连接池最大连接数(使用负值表示没有限制)
  250. max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
  251. max-idle: 10 # 连接池中的最大空闲连接
  252. min-idle: 1 # 连接池中的最小空闲连接
  253. #security放行白名单配置
  254. security:
  255. ignore:
  256. permitUrls: /api/system/demo/msg
  257. oauthUrls: /api/system/demo/hello,/api/portal/serviceInst/*/getServiceInstParam/*,/api/portal/serviceInst/*/getServiceInstCaseUrl/*,/api/portal/serviceInst/*/*/application,/api/portal/serviceInst/*/*/questionList,/api/miniprogram/serviceInst/*/getServiceInstParam/*,/api/miniprogram/serviceInst/*/getServiceInstCaseUrl/*,/api/miniprogram/serviceInst/*/*/application,/api/miniprogram/serviceInst/*/*/questionList
  258. # 获取 apiUrl 可访问的 roleIdList
  259. tuoheng:
  260. hhz-admin-perUrl: https://hhz.t-aaron.com/permission/getRoleIdList
  261. freeway-admin-perUrl: https://freeway.t-aaron.com/permission/getRoleIdList
  262. waterway-admin-perUrl: https://waterway.t-aaron.com/permission/getRoleIdList
  263. airmonitor-admin-perUrl: https://airmonitor.t-aaron.com/permission/getRoleIdList
  264. weptsp-admin-perUrl: https://weptsp.t-aaron.com/permission/getRoleIdList
  265. telecomumale-admin-perUrl: https://telecomumale.t-aaron.com/permission/getRoleIdList