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

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

Maven项目缺少Maven Dependencies

 

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

Maven项目缺少Maven Dependencies

 

相关文章: