Spring boot 找不到Spring启动插件

Spring boot 找不到Spring启动插件,spring-boot,gradle,intellij-idea,Spring Boot,Gradle,Intellij Idea,我对gradle项目有意见 我的build.gradle buildscript { ext { springBootVersion = '2.1.8.RELEASE' } repositories { mavenCentral() } dependencies { classpath( "org.springframework.boot:spring-boot-gradle-

我对gradle项目有意见

我的
build.gradle

buildscript {
    ext {
        springBootVersion = '2.1.8.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath(
                "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

plugins {
    id 'org.springframework.boot' version '2.1.8.RELEASE'
}

apply plugin: 'org.springframework.boot'

group = 'com.demo'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.springframework.boot:spring-boot-starter-security'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    runtimeOnly 'mysql:mysql-connector-java'
    providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    testImplementation 'org.springframework.security:spring-security-test'
}
当我尝试运行build.gralde时,出现了错误

Plugin [id: 'org.springframework.boot', version: '2.1.8.RELEASE'] was not found in any of the following sources:
观念中的梯度偏好


我不明白,问题出在哪里,我用Spring初始值设定项生成了项目,我想,我遇到了问题。 你只需要关闭“离线模式”,它就会从回购中下载


它位于Intellij IDEA的右侧,一种可能的解释是,通过显式配置
buildscript.repositories
,您不再拥有默认的
gradlePluginPortal()

例如,并非所有插件都可以在Maven Central上使用。

在重新启动IDE并导入项目后,您是否可以共享idea.log(“Help | Show log in…”)呢?