拓恒统一网关服务
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.

281 satır
9.4KB

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