pigx-gateway-dev.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. spring:
  2. cloud:
  3. gateway:
  4. locator:
  5. enabled: true
  6. routes:
  7. # 认证中心
  8. - id: pigx-auth
  9. uri: lb://pigx-auth
  10. predicates:
  11. - Path=/auth/**
  12. filters:
  13. # 验证码处理
  14. - ValidateCodeGatewayFilter
  15. # 前端密码解密
  16. - PasswordDecoderFilter
  17. #UPMS 模块
  18. - id: pigx-upms
  19. uri: lb://pigx-upms
  20. predicates:
  21. - Path=/admin/**
  22. filters:
  23. # 限流配置
  24. - name: RequestRateLimiter
  25. args:
  26. key-resolver: '#{@remoteAddrKeyResolver}'
  27. redis-rate-limiter.replenishRate: 10
  28. redis-rate-limiter.burstCapacity: 20
  29. # 降级配置
  30. - name: Hystrix
  31. args:
  32. name: default
  33. fallbackUri: 'forward:/fallback'
  34. # 代码生成模块
  35. - id: pigx-codegen
  36. uri: lb://pigx-codegen
  37. predicates:
  38. - Path=/gen/**
  39. # 定时任务模块
  40. - id: pigx-daemon
  41. uri: lb://pigx-daemon
  42. predicates:
  43. - Path=/daemon/**
  44. # 分布式事务管理模块
  45. - id: pigx-tx-manager
  46. uri: lb://pigx-tx-manager
  47. predicates:
  48. - Path=/tx/**
  49. # 工作流管理模块
  50. - id: pigx-activiti
  51. uri: lb://pigx-activiti
  52. predicates:
  53. - Path=/act/**
  54. security:
  55. encode:
  56. # 前端密码密钥,必须16位
  57. key: 'pigxpigxpigxpigx'
  58. # 不校验验证码终端
  59. ignore:
  60. clients:
  61. - test