使用注解@enablefeignclients时出错

n53p2ov0  于 2021-07-14  发布在  Java
关注(0)|答案(0)|浏览(223)

我想用外号与外部服务进行交互。应用程序启动时没有 @EnableFeignClient 注解。https://i.stack.imgur.com/housf.png
但是当我使用 @EnableFeignClient 应用程序停止运行。https://i.stack.imgur.com/hgfgy.png
下面是stacktrace:https://pastebin.com/tpcpap1k
内部版本.gradle:

plugins {
    id 'org.springframework.boot' version '2.4.3'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java'
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
}

ext {
    set('springCloudVersion', "2020.0.1")
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
    compileOnly 'org.projectlombok:lombok'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

dependencyManagement {
    imports {
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
    }
}

test {
    useJUnitPlatform()
}

有什么问题吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题