dubbo-spring-boot-project icon indicating copy to clipboard operation
dubbo-spring-boot-project copied to clipboard

Parameter 2 of method sentinelDataSourceHandler in com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration required a single bean, but 2 were found

Open Ariel827 opened this issue 4 years ago • 2 comments


APPLICATION FAILED TO START


Description:

Parameter 2 of method sentinelDataSourceHandler in com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration required a single bean, but 2 were found: - dubboScanBasePackagesPropertyResolver: defined by method 'dubboScanBasePackagesPropertyResolver' in class path resource [org/apache/dubbo/spring/boot/autoconfigure/DubboRelaxedBinding2AutoConfiguration.class] - environment: a programmatically registered singleton

Action:

Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed

Ariel827 avatar Jun 19 '20 04:06 Ariel827

Which version your application used?

mercyblitz avatar Jul 28 '20 08:07 mercyblitz

if this issue is still open, which bean should be marked as primary?

Sohailshah20 avatar Apr 14 '23 12:04 Sohailshah20