简体   繁体   English

无法使用Spring REST Docs和springfox 3.0.0-SNAPSHOT为Spring Boot + Spring Integration生成Swagger UI

[英]Unable to generate Swagger UI for Spring Boot + Spring Integration using Spring REST Docs & springfox 3.0.0-SNAPSHOT

I am trying to setup Swagger for a Spring Boot + Spring Integration Project (involving an inbound-gateway) using Spring REST Docs style and springfox 3.0.0-SNAPSHOT. 我正在尝试使用Spring REST Docs样式和springfox 3.0.0-SNAPSHOT为Spring Boot + Spring Integration Project(涉及入站网关)设置Swagger。

On following the instructions from https://github.com/springfox/springfox/tree/master/springfox-spring-integration-webmvc , I was able to generate the following snippets under target/generated-snippets/{my-end-point-id} : 按照https://github.com/springfox/springfox/tree/master/springfox-spring-integration-webmvc中的说明进行操作后,我能够在target / generation-snippets / {my-end-point下生成以下代码段-id}

  • curl-request.springfox 卷曲request.springfox
  • http-request.springfox HTTP-request.springfox
  • http-response.springfox HTTP-response.springfox
  • httpie-request.springfox httpie-request.springfox
  • request-body.springfox 请求body.springfox
  • response-body.springfox 响应body.springfox

However, after this point, I am unable to create/generate the Swagger UI html in the packaged .war. 但是,在此之后,我无法在打包的.war中创建/生成Swagger UI html。 Is there any extra configuration/setup that is required for this? 是否需要任何其他配置/设置?

As recommended, Springfox version: 3.0.0-SNAPSHOT Other version details: Spring Boot: 2.1.2.RELEASE Spring Integration: 5.1.2.RELEASE Java: 8 Apache Tomcat: 9.0.14 Apache Maven: 3.6.0 根据建议,Springfox版本:3.0.0-SNAPSHOT其他版本详细信息:Spring引导:2.1.2.RELEASE Spring集成:5.1.2.RELEASE Java:8 Apache Tomcat:9.0.14 Apache Maven:3.6.0

Please note that I wasn't clear whether to include a separate Swagger Configuration class with the @EnableSwagger2 annotation so I omitted this in my project setup. 请注意,我不清楚是否要在@ EnableSwagger2批注中包含单独的Swagger Configuration类,因此在项目设置中省略了此类。

Any help will be greatly appreciated! 任何帮助将不胜感激!

Sincerely, Bharath 真诚的巴拉

暂无
暂无

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

相关问题 从 Spring Boot 2.7.2 升级到 Spring Boot 3.0.0-SNAPSHOT: - Upgrade from Spring Boot 2.7.2 to Spring Boot 3.0.0-SNAPSHOT: springdoc-openapi-ui 不适用于 spring 版本 3.0.0-SNAPSHOT - springdoc-openapi-ui not working with spring version 3.0.0-SNAPSHOT 使用Springfox为OASP4j(Spring Boot)cxf Rest服务生成Swagger.json - Generate Swagger.json using Springfox for OASP4j (Spring boot) cxf Rest services 使用springfox-swagger2版本3.0.0-SNAPSHOT观察到错误“无法推断基本URL” - Observing error “Unable to infer base url” with springfox-swagger2 version 3.0.0-SNAPSHOT Springfox招摇 - 没有api-docs春季靴子球衣和gradle - Springfox swagger - no api-docs with spring boot jersey and gradle 从 Spring Boot 2.7.2 升级到 Spring Boot 3.0.0-SNAPSHOT: java: package javax.persistence does not exist - Upgrade from Spring Boot 2.7.2 to Spring Boot 3.0.0-SNAPSHOT: java: package javax.persistence does not exist 从 Spring Boot 2.7.2 升级到 Spring Boot 3.0.0-SNAPSHOT: Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest - Upgrade from Spring Boot 2.7.2 to Spring Boot 3.0.0-SNAPSHOT: Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest 如何使用 swagger-ui(springfox-swagger2 和 springfox-swagger-ui)和 spring-boot 应用程序上传多个文件? - How to upload multiple files using swagger-ui (springfox-swagger2 and springfox-swagger-ui) and spring-boot application? Springfox 3.0.0 不适用于 Spring Boot 2.6.0 - Springfox 3.0.0 is not working with Spring Boot 2.6.0 <spring boot springfox> Swagger UI 未显示示例值和 model</spring> - <Spring Boot / Springfox> Swagger UI not showing example value and model
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM