Feign 적용 중 "AbstractMethodError" 키워드로
여기까지 오신 분들!!
이거 SpringBoot와 SpringCloud & OpenFeign 버전이 안맞아서 그런겁니다...
java.lang.AbstractMethodError: Receiver class org.springframework.cloud.openfeign.support.SpringDecoder$FeignResponseAdapter does not define or inherit an implementation of the resolved method 'abstract org.springframework.http.HttpStatusCode getStatusCode()' of interface org.springframework.http.client.ClientHttpResponse.
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.0'
id 'io.spring.dependency-management' version '1.1.4'
}
...
java {
sourceCompatibility = '17'
}
...
dependencies {
// ...다른 코드들 생략...
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:4.1.0'
implementation 'org.springframework.cloud:spring-cloud-commons:4.1.1'
// openFeign 사용 시 spring cloud와 openfeign 의존성 주입 필요!
}
제가 사용한 버전은