application.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. server:
  2. port: 9999
  3. spring:
  4. application:
  5. name: jeecg-gateway
  6. cloud:
  7. gateway:
  8. discovery:
  9. locator:
  10. enabled: true
  11. globalcors:
  12. cors-configurations:
  13. '[/**]':
  14. allowCredentials: true
  15. allowedOrigins: "*"
  16. allowedMethods: "*"
  17. allowedHeaders: "*"
  18. #如果启用nacos或者数据库配置请删除一下配置
  19. routes:
  20. - id: jeecg-demo
  21. uri: lb://jeecg-demo
  22. predicates:
  23. - Path=/mock/**,/test/**,/bigscreen/template1/**,/bigscreen/template2/**,/sys/**
  24. - id: jeecg-system
  25. uri: lb://jeecg-system
  26. predicates:
  27. - Path=/sys/**,/eoa/**,/v1/**,/joa/**,/online/**,/bigscreen/**,/jmreport/**,/desform/**,/act/**,/plug-in/**,/generic/**
  28. - id: jeecg-system-websocket
  29. uri: lb:ws://jeecg-system
  30. predicates:
  31. - Path=/websocket/**,/eoaSocket/**,/newsWebsocket/**
  32. - id: jeecg-demo-websocket
  33. uri: lb:ws://jeecg-demo
  34. predicates:
  35. - Path=/vxeSocket/**
  36. # 全局熔断降级配置
  37. default-filters:
  38. - name: Hystrix
  39. args:
  40. name: default
  41. #转发地址
  42. fallbackUri: 'forward:/fallback'
  43. - name: Retry
  44. args:
  45. #重试次数,默认值是 3 次
  46. retries: 3
  47. #HTTP 的状态返回码
  48. statuses: BAD_GATEWAY,BAD_REQUEST
  49. #指定哪些方法的请求需要进行重试逻辑,默认值是 GET 方法
  50. methods: GET,POST
  51. # hystrix 信号量隔离,3秒后自动超时
  52. hystrix:
  53. enabled: true
  54. shareSecurityContext: true
  55. command:
  56. default:
  57. execution:
  58. isolation:
  59. strategy: SEMAPHORE
  60. thread:
  61. timeoutInMilliseconds: 3000