錯誤內容
Some problems were encountered while building the effective model for org.springframework.boot:test01:jar:2.4.0
'parent.relativePath' of POM org.springframework.boot:test01:2.4.0 (E:\JavaWeb_base\springbootTest\test01\pom.xml) points at com.ltb:springbootTest instead of org.springframework.boot:spring-boot-starter-parent, please verify your project structure @ line 7, column 13
It is highly recommended to fix these problems because they threaten the stability of your build.
For this reason, future Maven versions might no longer support building such malformed projects.
錯誤分析
子模塊的parent寫的不是父模塊,而是繼承了springboot
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.0</version>
</parent>
解決方法
在該
即
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.0</version>
<relativePath />
</parent>