简体   繁体   English

Springboot + Springfox + swagger2 + swagger-ui

[英]Springboot + springfox + swagger2 + swagger-ui

How can i access the generated swagger-ui.html ? 如何访问生成的swagger-ui.html? Or index.html I cant seem to find this file in my project. 或index.html我似乎在我的项目中找不到此文件。 Aghhhh! 啊!

I ended up pulling the swagger-ui dist files from git 我最终从git中拉出了swagger-ui dist文件

https://github.com/swagger-api/swagger-ui/tree/master/dist https://github.com/swagger-api/swagger-ui/tree/master/dist

I placed them inside public directory and modified swagger-ui.html 我将它们放置在公共目录中,并修改了swagger-ui.html

For the library setup which you have mentioned, the following will be the URL to access the UI - 对于您提到的库设置,以下将是访问UI的URL-

PROTOCOL://HOST:PORT/CONTEXT_NAME/swagger-ui.html

Eg: http://localhost:8083/xms/swagger-ui.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM