Closed
Description
Describe the bug
spring-cloud-starter-openfeign: 4.1.0
Unable to run native compiled application with FeignClients.
Caused by: org.graalvm.nativeimage.MissingReflectionRegistrationError: The program tried to reflectively invoke method public default feign.ResponseInterceptor$Chain feign.Capability.enrich(feign.ResponseInterceptor$Chain) without it being registered for runtime reflection. Add public default feign.ResponseInterceptor$Chain feign.Capability.enrich(feign.ResponseInterceptor$Chain) to the reflection metadata to solve this problem.
It works on 4.1.0-RC1
.
Sample
Create a simple FeignClient and run native compiled executable.
Dependencies versions
implementation platform("org.springframework.boot:spring-boot-dependencies:3.2.0")
implementation platform("org.springframework.cloud:spring-cloud-dependencies:2023.0.0")
implementation ('org.springframework.cloud:spring-cloud-starter-openfeign')
Workaround:
implementation platform("org.springframework.boot:spring-boot-dependencies:3.2.0")
implementation platform("org.springframework.cloud:spring-cloud-dependencies:2023.0.0")
implementation ('org.springframework.cloud:spring-cloud-starter-openfeign')
implementation ('io.github.openfeign:feign-core'){
version{ strictly '12.5'}
}
implementation ('io.github.openfeign:feign-micrometer'){
version{ strictly '12.5'}
}