2016-03-02 93 views

回答

11

你得到這個錯誤是因爲在maven central中沒有用於spring-boot-starter-parent的jar工件,因爲spring-boot-starter-parent使用pom包裝。其原因是因爲它打算用作父POM:

<parent> 
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-starter-parent</artifactId> 
    <version>1.3.2.RELEASE</version> 
</parent> 

或者,你可以導入管理依賴,如果那是你打算做:

<dependencyManagement> 
    <dependencies> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-parent</artifactId> 
      <version>1.3.2.RELEASE</version> 
      <scope>import</scope> 
      <type>pom</type> 
     </dependency> 
    </dependencies> 
</dependencyManagement> 

你可以在Importing Dependencies section of the Introduction to the Dependency Mechanism文章中詳細瞭解如何導入依賴關係。

相關問題