0

I am working on Spring boot application and I tried to Autowire Tracer object to get the traceId, but its raised the following exception. why??

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'brave.Tracer' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

I used the Tracer in a lot of projects and its always working with no issues!!

Rami Nassar
  • 303
  • 1
  • 4
  • 13

1 Answers1

-1

Spring boot container is not able to resolve the implementation of your autowired interface in this case. Please annotate your implementation class with spring stereotype annotations.

For e.g We provide @Reposiory for dao classes, @Service for service classes & @Component as a generic one. This will solve your problem. If you still face any issues, Just share your code snippet.

enter image description here

Catarina Ferreira
  • 1,824
  • 5
  • 17
  • 26