Why does springfox-swagger2 UI tell me “Unable to infer base url.”

前端 未结 13 867
醉话见心
醉话见心 2020-12-10 11:01

Why does springfox-swagger2 UI tell me Unable to infer base url. As far as I know, I am using a typical Swagger spring-boot configuration.

As you can

相关标签:
13条回答
  • 2020-12-10 11:45

    OAHH, for me it was something new. I had 2 different versions for springfox-swagger2 and springfox-swagger-ui

    Before:

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            **<version>2.6.1</version>**
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            **<version>2.9.2</version>**
        </dependency>
    

    After:

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            **<version>2.9.2</version>**
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            **<version>2.9.2</version>**
        </dependency>
    

    This solved my problem.

    0 讨论(0)
提交回复
热议问题