【发布时间】:2018-09-27 20:35:46
【问题描述】:
我正在尝试将 springfox/swagger 添加到我的 Spring Boot 应用程序中,但是当添加到 pom 文件时,maven 无法识别依赖项的版本。不幸的是,我找不到它背后的原因。这是我的 pom 文件的片段:
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.0.2</version>
</dependency>
版本被标记为红色,因为 Maven 无法识别。这种行为背后的原因可能是什么? 我正在使用 maven 3.3.9。
【问题讨论】:
-
我使用 maven Central 检查了您的依赖项。它们似乎存在。你在使用 IDE 吗?如果是的话是哪个?红色标记是否带有任何错误消息?
-
我正在使用 IntelliJ,错误消息显示“未找到依赖项 xyz”
-
您是否配置了私有 maven 存储库? (在您的 POM.xml 或其他地方?)
标签: java maven swagger swagger-ui springfox