springdoc用于swagger ui的自定义url

vlurs2pr  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(487)

我需要使用一个特定的网址招摇用户界面。我尝试使用“springdoc.swagger ui.path”属性,但它只重定向。
应用特性: springdoc.swagger-ui.path=/helloWorld/swagger 中的urlbrowser:http://localhost:8181/helloworld/swagger
但点击“回车”按钮时,url将更改为以下内容:
http://localhost:8181/manager/swagger ui/index.html?configurl=/manager/swagger/swagger.json/swagger-config
问题是,我怎样才能让这条路http://localhost:8181/helloworld/swagger/index.html或http://localhost:8181/helloworld/swagger一旦我按下回车键(我需要单词“swagger ui”和configurl消失)?
我用了springdoc,甚至还试过用springfox
pom.xml文件

<dependency>
         <groupId>org.springdoc</groupId>
         <artifactId>springdoc-openapi-ui</artifactId>
         <version>1.5.2</version>
    </dependency>

应用特性:

springdoc.api-docs.path=/helloWorld/swagger/swagger.json
springdoc.swagger-ui.path=/helloWorld/swagger

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题