为 Kinesis 升级 Spring Cloud/Spring Boot/Spring Cloud Stream Binder 时遇到异常

问题描述

我们有一个用于管理 AWS 客户端 bean 的自动配置库。这种方法在使用 Spring Cloud Hoxton.SR11Spring Boot 2.3.12.RELEASESpring Cloud Stream Binder for Kinesis 2.0.1.RELEASE效果很好。

现在我正在尝试升级Spring Cloud 2020.0.3Spring Boot 2.4.8Spring Cloud Stream Binder for Kinesis 2.2.0,但在启动微服务时遇到以下异常:

org.springframework.beans.factory.BeanDeFinitionStoreException: Invalid bean deFinition with name 'amazonS3' defined in class path resource [com/acme/aws/config/AWSAutoConfiguration.class]: @Bean deFinition illegally overridden by existing bean deFinition: Root bean: class [io.awspring.cloud.core.config.AmazonWebserviceClientfactorybean]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factorybeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null

我可以使用什么配置来确保我的 AmazonS3 bean 得到配置而不是从 io.awspring.cloud.core.config.AmazonWebserviceClientfactorybean 配置的 bean?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)