I am trying to configure my Spring Boot app as Admin Client, but it can not be build after setting the following dependency:
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>2.1.6</version>
</dependency>
When trying to build the app after setting this dependency in pom.xml I get following error:
Description:
An attempt was made to call the method org.springframework.boot.web.client.RestTemplateBuilder.setConnectTimeout(Ljava/time/Duration;)Lorg/springframework/boot/web/client/RestTemplateBuilder; but it does not exist. Its class, org.springframework.boot.web.client.RestTemplateBuilder, is available from the following locations:
jar:file:/Users/sherzad/.m2/repository/org/springframework/boot/spring-boot/2.0.6.RELEASE/spring-boot-2.0.6.RELEASE.jar!/org/springframework/boot/web/client/RestTemplateBuilder.class
It was loaded from the following location:
file:/Users/sherzad/.m2/repository/org/springframework/boot/spring-boot/2.0.6.RELEASE/spring-boot-2.0.6.RELEASE.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.boot.web.client.RestTemplateBuilder
I don“t know why it has two same RestTemplateBuilder...
How to fix this issue?
dependency:treeinside my project? - skm