I have autowired org.springframework.cloud.sleuth.Tracer in a service but getting the following error while building the project (mvn clean install). Although The applications runs through IDE and code works perfectly, but I need a way to remove the error while compiling the project.
Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.cloud.sleuth.Tracer' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
*************************** APPLICATION FAILED TO START ***************************
Description:
Parameter 3 of constructor in com.mmt.corporate.payments.PaymentService required a bean of type 'org.springframework.cloud.sleuth.Tracer' that could not be found.
Action:
Consider defining a bean of type 'org.springframework.cloud.sleuth.Tracer' in your configuration.
have included org.springframework.cloud.sleuth this way in pom.xml :
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>