1 问题描述
spring cloud项目,一般都是父项目中有多个子服务,也就是子module模块。
我这里有一个子模块 tizzy-sb
但子模块和父模块jar 版本都是unkonwn
在父项目中引用了常用的jar包,例如,引入了spring boot的依赖,那么在子项目中引入jar包 未指定version,所以下载下来的jar包都是unknown的
2 解决办法
在父模块下添加 Spring cloud 统一管理依赖
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Greenwich.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
然后重新下载刷新maven