karnikamit / kafka-producer-consumer-demo

kafka-producer-consumer-demo app
GNU General Public License v3.0
0 stars 0 forks source link

UnsatisfiedDependencyException #7

Open karnikamit opened 2 years ago

karnikamit commented 2 years ago

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'kafkaController': Unsatisfied dependency expressed through field 'producer'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.personal.kafka.service.Producer' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

karnikamit commented 2 years ago

mvn spring-boot:start


APPLICATION FAILED TO START


Description:

Field producer in com.personal.kafka.controller.kafkaController required a bean of type 'com.personal.kafka.service.Producer' that could not be found.

The injection point has the following annotations:

Action:

Consider defining a bean of type 'com.personal.kafka.service.Producer' in your configuration.