ruoyi-gateway.yml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # 安全配置
  2. security:
  3. # 不校验白名单
  4. ignore:
  5. whites:
  6. - /auth/code
  7. - /auth/logout
  8. - /auth/login
  9. - /auth/binding/*
  10. - /auth/social/callback
  11. - /auth/register
  12. - /auth/tenant/list
  13. - /resource/sms/code
  14. - /resource/sse/close
  15. - /*/v3/api-docs
  16. - /*/error
  17. - /csrf
  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. # 演示服务
  65. - id: ruoyi-demo
  66. uri: lb://ruoyi-demo
  67. predicates:
  68. - Path=/demo/**
  69. filters:
  70. - StripPrefix=1
  71. # MQ演示服务
  72. - id: ruoyi-test-mq
  73. uri: lb://ruoyi-test-mq
  74. predicates:
  75. - Path=/test-mq/**
  76. filters:
  77. - StripPrefix=1
  78. # sentinel 配置
  79. sentinel:
  80. filter:
  81. enabled: false
  82. # nacos配置持久化
  83. datasource:
  84. ds1:
  85. nacos:
  86. server-addr: ${spring.cloud.nacos.server-addr}
  87. dataId: sentinel-${spring.application.name}.json
  88. groupId: ${spring.cloud.nacos.config.group}
  89. username: ${spring.cloud.nacos.username}
  90. password: ${spring.cloud.nacos.password}
  91. namespace: ${spring.profiles.active}
  92. data-type: json
  93. rule-type: gw-flow