1. spring:
    2. cloud:
    3. gateway:
    4. routes:
    5. - id: server-user
    6. uri: lb://server-user
    7. predicates:
    8. - Path=/api/user/**
    9. - DocName=用户
    10. filters:
    11. - StripPrefix=2
    12. - id: server-basic
    13. uri: lb://server-basic
    14. predicates:
    15. - Path=/api/basic/**
    16. - DocName=基础
    17. filters:
    18. - StripPrefix=2
    19. # ws表示websocket的转发
    20. - id: nocas-websocket
    21. uri: lb:ws://server-websocket
    22. predicates:
    23. - Path=/serlb/ws/**
    24. - DocName=noSwagger
    25. filters:
    26. - StripPrefix=2
    27. default-filters:
    28. # - StripPrefix=2
    29. # - RewritePath=/api/(?<segment>.*), /$\{segment}
    30. - name: AuthFilter
    31. args:
    32. excludePatterns: #不做权限校验的路径
    33. - /api/user/userInfo/login
    34. # - /socket/**
    35. - /api/basic/openFeign/test01
    36. - /api/test/test01
    37. - /serlb/ws/socket/**