【发布时间】:2020-01-05 09:03:50
【问题描述】:
我们想将 Swagger 用于现有的 Spring-boot 项目(> 70 模型,> 250 端点),但我们遇到了一个问题,即应用程序无法启动并且在设置 Swagger 时进入无限循环。
- 日志
...
[DEBUG] 2020-01-04 23:28:32.500 Recursively resolving dependencies for type X;
[DEBUG] 2020-01-04 23:28:32.500 Adding type X2; for parameter x2
[DEBUG] 2020-01-04 23:28:32.501 Recursively resolving dependencies for type X2;
[DEBUG] 2020-01-04 23:28:32.501 Adding type Ljava/util/List<X3>; for parameter x3s
[DEBUG] 2020-01-04 23:28:32.501 Adding collectionElement type X3;
[DEBUG] 2020-01-04 23:28:32.501 Recursively resolving dependencies for collectionElement type X3;
[DEBUG] 2020-01-04 23:28:32.501 Adding type Ljava/util/List<X4;>; for parameter x4s
[DEBUG] 2020-01-04 23:28:32.501 Adding collectionElement type X4;
[DEBUG] 2020-01-04 23:28:32.501 Recursively resolving dependencies for collectionElement type X4;
...
- POM
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
...
<dependencies>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
....
<dependencies>
感谢任何帮助,甚至是一些关于如何深入研究这个问题的提示,因为日志没有帮助,我不知道从哪里开始! 如果您需要更多详细信息,请告诉我。
【问题讨论】:
标签: java spring spring-boot swagger springfox