spring clound eureka 服务器依赖错误gradle intellij

spring clound eureka server dependencies error gradle intellij

我无法在 gradle 项目中添加 spring-cloud-netflix-eureka-server 作为依赖项 (IDE Intellij)

please find my build.gradle file below.

        plugins {
        id 'org.springframework.boot' version '2.3.1.RELEASE'
        id 'io.spring.dependency-management' version '1.0.9.RELEASE'
        id 'java'
        id 'war'
    }

    group = 'com.lti.mod.services'
    version = '0.0.1-SNAPSHOT'
    sourceCompatibility = '1.8'

    configurations {
        compileOnly {
            extendsFrom annotationProcessor
        }
    }

    repositories {
        mavenCentral()
    }

    dependencies {
        implementation('io.jsonwebtoken:jjwt:0.9.1')
        implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
        implementation 'org.springframework.boot:spring-boot-starter-data-rest'
        implementation 'org.springframework.boot:spring-boot-starter-security'
        implementation 'org.springframework.boot:spring-boot-starter-web'
        implementation 'org.liquibase:liquibase-core'
        /*compile group: 'io.jsonwebtoken', name: 'jjwt', version: '0.9.1'*/
        compile('org.springframework.cloud:spring-cloud-netflix-eureka-server:2.1.5.RELEASE')
        compileOnly 'org.projectlombok:lombok'
        runtimeOnly 'mysql:mysql-connector-java'
        annotationProcessor 'org.projectlombok:lombok'
        providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
        testImplementation('org.springframework.boot:spring-boot-starter-test') {
            exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
        }
        testImplementation 'org.springframework.security:spring-security-test'
    }

    test {
        useJUnitPlatform()
    }

    

请在下面找到 gradle 构建消息。

        > Configure project : The compile configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 7.0. Please use the implementation configuration instead. Consult the upgrading guide for further information: https://docs.gradle.org/6.4.1/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations
at build_5fewyf5k4gqf0wzmewce4q3ow$_run_closure3.doCall(D:\AngularCourse\core-services\build.gradle:30)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)

compile 配置在 Gradle 7.0 中已弃用,如您的错误消息所述。请改用implementation

查看文档 - https://docs.gradle.org/current/userguide/java_plugin.html#tab:configurations