使用eclipse搭建maven 项目时缺少Maven Dependencies

因使用了springboot最新版本,pom.xml如下,其中多了一个 <dependencyManagement>标签
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.4.RELEASE</version>
</parent>
<groupId>com.sunxy</groupId>
<artifactId>TestSpringBoot2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
</dependencyManagement>
</project>
项目右键---> propproperties
却存在 Maven Dependencies

解决办法:删除<dependencyManagement>标签 即可


在使用Eclipse搭建Maven项目并采用springboot最新版本时,可能会遇到MavenDependencies缺失的问题。这通常与pom.xml中包含<dependencyManagement>标签有关。本文将详细介绍如何通过调整pom.xml配置来解决此问题。
1万+

被折叠的 条评论
为什么被折叠?



