最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to configure custom context path for Swagger UI in Spring Boot 3.0 with OpenAPI 3.0 (Springdoc OpenAPI) - Stack Overflow

programmeradmin3浏览0评论

I'm using Spring Boot 3.0 with OpenAPI 3.0 (via Springdoc OpenAPI) in my application, and I need to change the default context path of the application, as well as configure the Swagger UI and OpenAPI documentation to reflect the custom path.

Here’s what I want to achieve:

I want to change the application context path from the default / to something like /myapp. I want the Swagger UI to be accessible at /myapp/swagger-ui.html. I want the OpenAPI documentation (JSON) to be available at /myapp/api-docs.

springdoc-openapi-starte-webmvc-ui(2.5.0)

springdoc.api-docs.path=/myapp/v3/api-docs
springdoc.swagger-ui.path=/myapp/swagger-ui.html
springdoc.swagger-ui.urls.url=/test-service.yaml

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论