Springfox swagger UI 具有错误的基本 URL。我不清楚 19080 端口来自哪里,因为没有服务在该端口上侦听。我需要做哪些设置才能让 springfox 生成正确的基本 URL?
Swagger 界面
错误的基本网址
正确的基本网址
以下是我使用的 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>
答案 0 :(得分:0)
如果你想改变端口号,你将添加属性文件端口号。例如,
server.port=8081