如何更改 swagger-ui.html 默认路径 [英] How to change swagger-ui.html default path

查看:205
本文介绍了如何更改 swagger-ui.html 默认路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将我的 swagger-ui 路径从 localhost:8080/swagger-ui.html 更改为localhost:8080/myapi/swagger-ui.htmlspringboot重定向对我很无助

I wanna change my swagger-ui path from localhost:8080/swagger-ui.html to localhost:8080/myapi/swagger-ui.html in springboot redirect is helpless to me

推荐答案

在Spring Boot的application.properties中

In the application.properties of Spring Boot

springdoc.swagger-ui.path=/swagger-ui-custom.html

在你的情况下是

springdoc.swagger-ui.path=/myapi/swagger-ui.html

这篇关于如何更改 swagger-ui.html 默认路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆