问题出现在我在配置druid 的时候,我配置完之后,因为druid @Primary表示这里定义的DataSource将覆盖其他来源的DataSource。

但是报错了
A bean with that name has already been defined in class path resource and overriding is disabled.
很显然它说不能重写,还告诉我们可以重命名一个bean,或者通过设置spirng.main来进行覆盖.spring.main.allow-bean-definition-overriding=true

然后我们配置进去就行了
A bean with that name has already been defined in class path resource and overriding is disabled.

相关文章:

  • 2021-09-11
  • 2021-06-24
  • 2022-01-11
  • 2021-09-23
  • 2022-01-20
  • 2021-05-22
  • 2021-06-15
猜你喜欢
  • 2021-12-16
  • 2022-12-23
  • 2022-01-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案