【发布时间】:2022-05-10 04:13:17
【问题描述】:
使用最新版本的 chaos-monkey-spring-boot (v2.5.4) 和 db-scheduler-spring-boot-starter (v10.3, 请参阅https://github.com/kagkarlsson/db-scheduler),启动应用程序时出现异常:
The bean 'scheduler', defined in class path resource [de/codecentric/spring/boot/chaos/monkey/configuration/ChaosMonkeyConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [com/github/kagkarlsson/scheduler/boot/autoconfigure/DbSchedulerAutoConfiguration.class] and overriding is disabled.
不幸的是,这两个库都使用了一个过于通用的名称“调度程序”的 bean。覆盖 Bean 定义不是一种选择,它会导致其他问题。
您有什么想法可以解决这个问题吗?
【问题讨论】: