Spring Cloud:如何使用没有功能区的Feign

 梦幻死灵_791 发布于 2022-12-04 02:13

我想在没有客户端负载均衡器功能区的情况下使用Feign,因为我不想运行需要分发且高度可用的Eureka.相反,具有由Route53管理的内部DNS名称的内部ELB可以正常运行.

提供@FeignClient始终导致的纯URL no loadbalancer found for ..,因此我尝试阻止Feign使用Ribbon:

春云Netflix的自带FeignRibbonClient,用于如果ILoadBalancerribbon-loadbalancer存在.但是,如果排除此依赖关系,则会FeignConfiguration被破坏:

Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'apiVersionClient': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: feign.codec.Decoder org.springframework.cloud.netflix.feign.FeignConfiguration.decoder; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

欢迎提示:-)

1 个回答
  • 如果要使用普通URL @FeignClient(value="http://example.com", loadbalance=false)

    使用Brixton发布列车 @FeignClient(url="http://example.com", name="example")

    2022-12-11 02:57 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有