带有 Swagger 3 的 spring-context-indexer [英] spring-context-indexer with Swagger 3
问题描述
我有一个 maven 多模块 java 11 项目.项目配置了 Swagger 3
I have a maven multimodule java 11 project. The project is configured with Swagger 3
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>3.0.0</version>
</dependency>
一旦我在所有 maven 模块中添加 spring-context-indexer 作为依赖项,swagger ui 就不再工作了
As soon as I add spring-context-indexer as dependency in all maven modules the swagger ui is not working anymore
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-indexer</artifactId>
<version>5.2.2.RELEASE</version>
<optional>true</optional>
</dependency>
如果我从所有 maven 模块中删除 spring-context-indexer 依赖项,swagger ui 就可以工作了.
If I remove the spring-context-indexer dependency from all maven modules, the swagger ui works.
我该如何解决这个问题?(如果这很重要,我们使用 spring 安全性)
How can I solve this issue? (we use spring security if this matters)
推荐答案
有时,依赖项的最后一个版本可能与其他依赖项存在一些兼容性问题.尝试旧版本.
sometimes the last version of a dependency may have some compatibility issues with other dependencies. try a older version.
这篇关于带有 Swagger 3 的 spring-context-indexer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!