spring-boot - 如何更改 swagger-ui.html 默认路径

标签 spring-boot swagger-ui swagger-2.0

我想换我的招摇-ui 来自 localhost:8080/swagger-ui.html 的路径到localhost:8080/myapi/swagger-ui.htmlspringboot重定向对我来说很无助

最佳答案

在 Spring Boot 的 application.properties 中

springdoc.swagger-ui.path=/swagger-ui-custom.html
在你的情况下,它将是
springdoc.swagger-ui.path=/myapi/swagger-ui.html

关于spring-boot - 如何更改 swagger-ui.html 默认路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57193286/

相关文章:

spring-boot - Spring Boot 2 Actuator Starter 中的空指针 w。 Tomcat 指标

java - UnsatisfiedDependencyException : Error creating bean with name 'entityManagerFactory'

spring-boot - Spring Security WebFlux 注销

rest - swagger ui 中重复的 bool 值

node.js - 将 yaml 文件作为引用包含在另一个 yaml 文件 swagger 中

java - 如何在实体中添加对象列表

node.js - 如何在 hapi-swagger 中使用 apiKey 进行身份验证?

swagger - 如何链接到 Swagger 中的另一个端点

spring-boot - 401未经授权的页面会 Swagger 吗?

导入包的 GOSwagger 实现