ruoyi-gateway.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. spring:
  18. cloud:
  19. # 网关配置
  20. gateway:
  21. # 打印请求日志(自定义)
  22. requestLog: true
  23. discovery:
  24. locator:
  25. lowerCaseServiceId: true
  26. enabled: true
  27. routes:
  28. # 认证中心
  29. - id: ruoyi-auth
  30. uri: lb://ruoyi-auth
  31. predicates:
  32. - Path=/auth/**
  33. filters:
  34. - StripPrefix=1
  35. # 代码生成
  36. - id: ruoyi-gen
  37. uri: lb://ruoyi-gen
  38. predicates:
  39. - Path=/tool/**
  40. filters:
  41. - StripPrefix=1
  42. # 系统模块
  43. - id: ruoyi-system
  44. uri: lb://ruoyi-system
  45. predicates:
  46. - Path=/system/**,/monitor/**
  47. filters:
  48. - StripPrefix=1
  49. # 资源服务
  50. - id: ruoyi-resource
  51. uri: lb://ruoyi-resource
  52. predicates:
  53. - Path=/resource/**
  54. filters:
  55. - StripPrefix=1
  56. # workflow服务
  57. - id: ruoyi-workflow
  58. uri: lb://ruoyi-workflow
  59. predicates:
  60. - Path=/workflow/**
  61. filters:
  62. - StripPrefix=1
  63. # 演示服务
  64. - id: ruoyi-demo
  65. uri: lb://ruoyi-demo
  66. predicates:
  67. - Path=/demo/**
  68. filters:
  69. - StripPrefix=1
  70. # MQ演示服务
  71. - id: ruoyi-test-mq
  72. uri: lb://ruoyi-test-mq
  73. predicates:
  74. - Path=/test-mq/**
  75. filters:
  76. - StripPrefix=1
  77. # sentinel 配置
  78. sentinel:
  79. filter:
  80. enabled: false
  81. # nacos配置持久化
  82. datasource:
  83. ds1:
  84. nacos:
  85. server-addr: ${spring.cloud.nacos.server-addr}
  86. dataId: sentinel-${spring.application.name}.json
  87. groupId: ${spring.cloud.nacos.config.group}
  88. username: ${spring.cloud.nacos.username}
  89. password: ${spring.cloud.nacos.password}
  90. namespace: ${spring.profiles.active}
  91. data-type: json
  92. rule-type: gw-flow