knife4j集成gateway点击左侧菜单会自动跳转到首页
时间: 2023-05-21 19:05:35 浏览: 106
如果您在使用 knife4j 集成 gateway 时出现了左侧菜单自动跳转到首页的问题,可以尝试在 gateway.yml 配置文件中加入如下代码,以解决该问题:
spring:
resources:
static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,classpath:/webjars/
knife4j:
version: 2.0.4
gateway:
serve-static-resources: true
resources:
- id: "default"
url: "/v2/api-docs"
name: "默认文档"
location: "classpath*:META-INF/resources/"
swaggerVersion: "2"
version: "2.0"
routes:
- id: "default"
resources:
- "default"
predicates:
- Path=/default/**
filters:
- StripPrefix=1
uri: https://petstore.swagger.io
- id: "demo"
resources:
- "demo"
predicates:
- Path=/demo/**
filters:
- StripPrefix=1
uri: https://petstore.swagger.io
至于 "lua closure factory" 完整代码和 "中文加密" 的问题,我可以为您提供帮助,您可以具体描述您需要解决的问题或需求,我将尽力给出最优解答。