[英]Config Swagger-ui with Jersey
I am trying to configuring Swagger + Swagger-ui + Jersey
. 我正在尝试配置Swagger + Swagger-ui + Jersey
。 I have my web service on Tomcat . 我在Tomcat上有Web服务。
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
. 要基于swagger-ui documentation
集成swagger-ui
,我需要将文件放在webapp目录中的/dist/
,并将index.html
文件更改为指向我的swagger.json
。 However, I want to use swagger-ui webjar
found here 但是,我想使用在这里找到的swagger-ui webjar
https://mvnrepository.com/artifact/org.webjars/swagger-ui/2.2.6 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 1)在项目的“ webapp”文件夹中创建一个“ doc”文件夹
2) Download Swagger-ui zip file 2) 下载 Swagger-ui zip文件
3) Extract dist folder and copy all files to my "webapp/doc" folder 3)解压缩dist文件夹并将所有文件复制到我的“ webapp / doc”文件夹中
4) Change index.html that was in "webapp/doc" 4)更改“ webapp / doc”中的index.html
It might help you. 它可能会帮助您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.