Java springfox swagger生成的基本URL不正确

Java springfox swagger生成的基本URL不正确,java,swagger,swagger-ui,springfox,Java,Swagger,Swagger Ui,Springfox,Springfox swagger UI的基本URL错误。我甚至不清楚19080端口来自何处,因为该端口上没有监听服务。我需要做什么设置才能让springfox生成正确的基本URL 大摇大摆的用户界面 错误的基本URL 基本URL:dev.example.com:19080/newapi 正确的基本URL 基本URL:dev.example.com/newapi 下面是我正在使用的Springfox版本 <dependency> <grou

Springfox swagger UI的基本URL错误。我甚至不清楚19080端口来自何处,因为该端口上没有监听服务。我需要做什么设置才能让springfox生成正确的基本URL

大摇大摆的用户界面

错误的基本URL

  • 基本URL:dev.example.com:19080/newapi
正确的基本URL

  • 基本URL:dev.example.com/newapi
下面是我正在使用的Springfox版本

    <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>
        <scope>compile</scope>
    </dependency>

伊奥·斯普林福克斯
springfox-Swagger 2
2.9.2
编译
伊奥·斯普林福克斯
springfox招摇过市用户界面
2.9.2
编译

如果要更改端口号,您将添加属性文件端口号。例如

server.port=8081