Config Swagger-ui with Jersey

放肆的年华 提交于 2019-12-12 04:32:47

问题


I am trying to configuring Swagger + Swagger-ui + Jersey. I have my web service on Tomcat.

I have been able to integrate the swagger with Jersey.

To integrate swagger-ui, based on the swagger-ui documentation, I need to put the files under /dist/ in my webapp directory and changing the index.html file to point to my swagger.json. However, I want to use swagger-ui webjar found here

https://mvnrepository.com/artifact/org.webjars/swagger-ui/2.2.6

I have not been able to figure out how to do this.


回答1:


I tried to use this same dependency on my project and didn't find a solution to change it. What I did is:

1) Create a "doc" folder inside my "webapp" folder on my project

2) Download Swagger-ui zip file

3) Extract dist folder and copy all files to my "webapp/doc" folder

4) Change index.html that was in "webapp/doc"

It might help you.



来源:https://stackoverflow.com/questions/40914184/config-swagger-ui-with-jersey

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!