SpringFox Swagger 从 api 请求中删除 servlet 上下文路径?需要反向代理主机

问题描述

我在 swagger 2.8.0 上找到了一个解决方案,使用 RelativePath() 设置 basePath 但在那个版本上我无法部署我的应用程序,因为需要 spring-plugin-core 2.0.0 -RELEASE。我检查了我的依赖关系,看起来很安静正常。

我使用的是 spring boot 2.4.1 版本。

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.1</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

我用这些来炫耀。

<dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>3.0.0-SNAPSHOT</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.9.2</version>
        </dependency>

提前致谢....

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)