idea踩坑,maven父工程import进来的依赖,子工程没有继承进来,版本出现unknown
- 父工程引入依赖
<!-- SpringBoot 依赖配置 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.2.6.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
- 子工程引入springboot依赖出现版本unknown
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
3.解决
1.选中子工程模块,delete删除
2.重新引入该子模块,即可看到依赖已经从父工程继承过来了