簡體   English   中英

初始化 SpringBoot 項目時遇到問題

[英]Having trouble initializing a SpringBoot project

我試圖在 IntelliJ IDEA 中初始化一個 Spring Boot 應用程序。 得到這個錯誤。 我怎樣才能解決這個問題?

A problem occurred configuring root project 'DemoSpringApplication'.
> Could not resolve all files for configuration ':classpath'.
   > Could not find org.springframework.boot:spring-boot-buildpack-platform:2.7.2.
     Searched in the following locations:
       - https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-buildpack-platform/2.7.2/spring-boot-buildpack-platform-2.7.2.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.7.2 > org.springframework.boot:spring-boot-gradle-plugin:2.7.2
   > Could not find org.springframework.boot:spring-boot-loader-tools:2.7.2.
     Searched in the following locations:
       - https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-loader-tools/2.7.2/spring-boot-loader-tools-2.7.2.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.7.2 > org.springframework.boot:spring-boot-gradle-plugin:2.7.2

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

修復 build.gradle 插件org.springframework.boot版本2.7.22.7.1

試試這個 -> id 'org.springframework.boot' version '2.7.1'

我之前也遇到過同樣的問題,所以您需要更新您的 intellij idea,或者如果由於任何原因您無法更新它,請卸載 intellij idea 並下載它的新版本。 根據 intellij idea 社區的說法,springboot 2.7 存在舊版本無法支持的錯誤

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM