【发布时间】:2023-04-03 15:45:01
【问题描述】:
依赖关系
org.springframework.cloud:spring-cloud-starter-feign:jar:1.2.2.RELEASE:compile
com.netflix.feign:feign-core:jar:8.16.2:compile
com.netflix.feign:feign-slf4j:jar:8.16.2:compile
com.netflix.feign:feign-jackson:jar:8.15.1:compile
在 SpringBootAppilication 上启用 Feign
@EnableFeignClients(basePackages = "com.vett.services.bucket.restclient")
Feign接口客户端
@FeignClient(name = "myClient", configuration = ClientConfigs.class, url = "https://my-endpoint");
public interface MyClient {
导致此错误
org.springframework.core.annotation.AnnotationConfigurationException: Attribute 'value' in annotation [org.springframework.cloud.netflix.feign.FeignClient] must be declared as an @AliasFor [serviceId], not [name]
目前为止
由于我不清楚问题是什么,我使用了value 而不是name,我的搜索没有成功,我看到一些假注释问题,但似乎与此完全不同
【问题讨论】:
标签: java spring spring-boot netflix netflix-feign