【发布时间】:2018-09-20 19:23:05
【问题描述】:
在我的 Spring Boot 应用程序中,我使用 swagger 来记录文档。我需要将默认的http://localhost:8080/swagger-ui.html 路径更改为http://localhost:8080/docs/swagger-ui.html,因为我有以下与默认 swagger-ui 路径冲突的控制器。
@RequestMapping("/{coll}")
public List<Map> getData(@PathVariable String coll){
....
return list;
}
我搜索了很多资源(例如:https://github.com/springfox/springfox/issues/1443)并提出了很多解决方案,但对我没有任何帮助。由于这是 Swagger 中非常基本的要求,将swagger-ui.html 默认路径更改为自定义路径的最佳方法是什么?
【问题讨论】:
-
我遇到了以下问题。无法从 http //localhost/swagger/v1/swagger.json 读取 swagger json
标签: spring spring-boot swagger swagger-ui