ruoyi-gateway.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # 安全配置
  2. security:
  3. # 不校验白名单
  4. ignore:
  5. whites:
  6. - /auth/code
  7. - /auth/logout
  8. - /auth/login
  9. - /auth/binding/*
  10. - /auth/register
  11. - /auth/tenant/list
  12. - /resource/sms/code
  13. - /resource/sse/close
  14. - /*/v3/api-docs
  15. - /*/error
  16. - /csrf
  17. - /warm-flow-ui/**
  18. spring:
  19. cloud:
  20. # 网关配置
  21. gateway:
  22. # 打印请求日志(自定义)
  23. requestLog: true
  24. discovery:
  25. locator:
  26. lowerCaseServiceId: true
  27. enabled: true
  28. routes:
  29. # 认证中心
  30. - id: ruoyi-auth
  31. uri: lb://ruoyi-auth
  32. predicates:
  33. - Path=/auth/**
  34. filters:
  35. - StripPrefix=1
  36. # 代码生成
  37. - id: ruoyi-gen
  38. uri: lb://ruoyi-gen
  39. predicates:
  40. - Path=/tool/**
  41. filters:
  42. - StripPrefix=1
  43. # 系统模块
  44. - id: ruoyi-system
  45. uri: lb://ruoyi-system
  46. predicates:
  47. - Path=/system/**,/monitor/**
  48. filters:
  49. - StripPrefix=1
  50. # 资源服务
  51. - id: ruoyi-resource
  52. uri: lb://ruoyi-resource
  53. predicates:
  54. - Path=/resource/**
  55. filters:
  56. - StripPrefix=1
  57. # workflow服务
  58. - id: ruoyi-workflow
  59. uri: lb://ruoyi-workflow
  60. predicates:
  61. - Path=/workflow/**
  62. filters:
  63. - StripPrefix=1
  64. # warm-flow服务
  65. - id: warm-flow
  66. uri: lb://ruoyi-workflow
  67. predicates:
  68. - Path=/warm-flow-ui/**,/warm-flow/**
  69. # 演示服务
  70. - id: ruoyi-demo
  71. uri: lb://ruoyi-demo
  72. predicates:
  73. - Path=/demo/**
  74. filters:
  75. - StripPrefix=1
  76. # MQ演示服务
  77. - id: ruoyi-test-mq
  78. uri: lb://ruoyi-test-mq
  79. predicates:
  80. - Path=/test-mq/**
  81. filters:
  82. - StripPrefix=1
  83. # sentinel 配置
  84. sentinel:
  85. filter:
  86. enabled: false
  87. # nacos配置持久化
  88. datasource:
  89. ds1:
  90. nacos:
  91. server-addr: ${spring.cloud.nacos.server-addr}
  92. dataId: sentinel-${spring.application.name}.json
  93. groupId: ${spring.cloud.nacos.config.group}
  94. username: ${spring.cloud.nacos.username}
  95. password: ${spring.cloud.nacos.password}
  96. namespace: ${spring.profiles.active}
  97. data-type: json
  98. rule-type: gw-flow