首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >spring clound eureka服务器依赖关系错误gradle intellij

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

Stack Overflow用户
提问于 2020-07-13 01:11:41
回答 1查看 173关注 0票数 0

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

代码语言:javascript
复制
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 build消息。

代码语言:javascript
复制
        > 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.)
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-07-13 01:19:35

正如你的错误消息所说的那样,compile配置在Gradle7.0中被弃用了。请改用implementation

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62864106

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档