无法注册Spring SnsWebConfiguration.class



我有以下在我的诗,我不确定我需要这两个。因为我在应用程序启动时得到一个错误,只有一个SnsWebConfiguration.class bean可以注册。我最近将aws依赖项升级到2.3

<dependency>
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-starter-aws</artifactId>
</dependency>
<dependency>
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-starter-aws-messaging</artifactId>
</dependency>

错误:

defined in class path resource [io/awspring/cloud/autoconfigure/messaging/SnsAutoConfiguration$SnsWebConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [io/awspring/cloud/messaging/config/annotation/SnsWebConfiguration.class] and overriding is disabled.nnAction:nnConsider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

我发现了问题。这与以前版本中的@EnableX注释有关。一旦我删除它们,它就开始正常工作了。

相关内容

  • 没有找到相关文章

最新更新