Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConflictingBeanDefinitionException: Annotation-specified bean name 'kafkaProducer' already existed #25

Closed
GenshenWang opened this issue Jul 23, 2020 · 1 comment
Assignees
Labels
bug Something isn't working
Projects

Comments

@GenshenWang
Copy link

Hi, while I running project, there occurs a exception :
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.caocao.dic.charge.DicChargeApplication]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'kafkaProducer' for bean class [io.github.stavshamir.springwolf.producer.KafkaProducer] conflicts with existing, non-compatible bean definition of same name and class [com.caocao.dic.charge.server.mq.producer.KafkaProducer]
If project already exist class KafkaProducer, then will conflict with the class io.github.stavshamir.springwolf.producer.KafkaProducer. How should I solve the problem?

@stavshamir stavshamir self-assigned this Jul 23, 2020
@stavshamir stavshamir added the bug Something isn't working label Jul 23, 2020
@stavshamir stavshamir added this to the v0.0.2 milestone Jul 23, 2020
@stavshamir
Copy link
Member

Thanks for reporting this problem! Obviously naming this bean with a common name such as kafkaProducer was a mistake on my part. I will fix it in the coming days. If you wish, you can provide a pull request yourself, changing the name of the bean from kafkaProducer to springwolfKafkaProducer.

In the meanwhile, if possible, to you can change the name of your bean from kafkaProducer to something else, but I understand this may be inconvenient.

@stavshamir stavshamir added this to To do in springwolf Jul 23, 2020
@stavshamir stavshamir moved this from To do to In progress in springwolf Jul 26, 2020
springwolf automation moved this from In progress to Done Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
springwolf
  
Done
Development

No branches or pull requests

2 participants