问题描述
我们有一个用于管理 AWS 客户端 bean 的自动配置库。这种方法在使用 Spring Cloud Hoxton.SR11
、Spring Boot 2.3.12.RELEASE
和 Spring Cloud Stream Binder for Kinesis 2.0.1.RELEASE
时效果很好。
现在我正在尝试升级到 Spring Cloud 2020.0.3
、Spring Boot 2.4.8
和 Spring 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 (将#修改为@)