Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans
·
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
***************************
APPLICATION FAILED TO START
***************************
Description:
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
考虑将其中一个bean标记为@Primary,更新使用者以接受多个bean,或者使用@Qualifier标识应该使用的bean
出现这个错误主要是你的spring里面的bean名字重复了。
在注解后可以加不同的名字区分bean。
@Bean(name = "name")
@Bean(name = "beanName")
@Component("defaultName")
@Service("primarilyName")
仔细排查在错误日志可以得到具体的错误位置,直接定位到错误。
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)