Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 在以下任何源中均未找到插件[id:';org.springframework.boot';,版本:';2.2.4.RELEASE';]:_Spring Boot_Gradle - Fatal编程技术网

Spring boot 在以下任何源中均未找到插件[id:';org.springframework.boot';,版本:';2.2.4.RELEASE';]:

Spring boot 在以下任何源中均未找到插件[id:';org.springframework.boot';,版本:';2.2.4.RELEASE';]:,spring-boot,gradle,Spring Boot,Gradle,我刚刚从下载了springboot项目。在运行它之后,我得到了这个错误 * What went wrong: Plugin [id: 'org.springframework.boot', version: '2.2.4.RELEASE'] was not found in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Plugin Reposito

我刚刚从下载了springboot项目。在运行它之后,我得到了这个错误

* What went wrong:
Plugin [id: 'org.springframework.boot', version: '2.2.4.RELEASE'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.springframework.boot:org.springframework.boot.gradle.plugin:2.2.4.RELEASE')
  Searched in the following repositories:
    Gradle Central Plugin Repository

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

任何人都可以提出根本原因。

我建议您在终端中运行
gradle build
命令。 在此之后,进行渐变同步

你的IDE一定有问题


希望这能解决您的问题。

spring.io生成的默认build.gradle文件只在存储库中包含mavenCentral。不知道为什么,但偶尔会出现这个错误。在那里添加jcenter,它应该可以工作。 更清楚地说,更改后的存储库可能如下所示

repositories {
    jcenter()
    mavenCentral()
} 

我可以如下解决:
在build.gradle文件中添加以下行:



然后必须打开一个命令窗口,输入项目所在的文件夹,并执行以下顺序:
渐变构建


就是这样,你的错误必须解决。。。你好

首先,你需要了解这个问题。为什么会发生这种错误? build.gradle文件中的行

plugins {
       id 'org.springframework.boot' version '2.2.4.RELEASE'
       id 'io.spring.dependency-management' version '1.0.9.RELEASE'
       id 'java'
}
告诉gradle“spring”和“java”是构建项目所必需的。 插件是gradle的任务

现在,为了编译这个项目,gradle必须带上这些指定的插件。为此 将查找您指定的存储库。在

repositories {
            mavenCentral()
}

因此,代码一定没有任何问题。刷新必须解决

在我的情况下,我在gradle.properties文件中配置了一个代理,但我没有通过他们的VPN


如果这也是您的情况,您可以只注释该文件中的行,或者如果可能的话只连接到VPN。

我也遇到了这个问题,在尝试了上述所有操作后,它没有得到解决。然后,通过使用其他版本和其他版本的JDK尝试gradle,我发现这是由于SSL身份验证问题造成的。在我的例子中,我必须将本地nexus存储库中的安全证书添加到Gradle使用的JDK中,问题得到了解决


您可以通过浏览nexus repository manager并从浏览器下载SSL证书来下载SSL证书。

接受的答案对我不起作用。在项目根目录中添加设置.gradle文件后,我可以解决此问题

settings.gradle:

pluginManagement {
    repositories {
        maven { url "<Repo_URL>" }
    }
}
pluginManagement{
存储库{
maven{url”“}
}
}

伙计们对我来说只是一个老版本,我根据这个链接进行了更新。对于Ubuntu:

$ mkdir /opt/gradle
$ unzip -d /opt/gradle gradle-7.0.2-bin.zip
$ ls /opt/gradle/gradle-7.0.2
LICENSE  NOTICE  bin  getting-started.html  init.d  lib  media

检查你的互联网连接