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



我无法将spring-cloud-netflix-eureka-server添加为gradle项目(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()
}

请在下面找到渐变构建消息。

> 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:AngularCoursecore-servicesbuild.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

最新更新