简体   繁体   中英

Config Swagger-ui with Jersey

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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