while using Spring Boot and Spring Cloud

  Kiến thức lập trình

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:161)

The following method did not exist:

'void org.springframework.boot.builder.SpringApplicationBuilder.<init>(java.lang.Object[])'

The calling method’s class, org.springframework.cloud.bootstrap.BootstrapApplicationListener, was loaded from the following location:

jar:file:/C:/Users/Pradeep/.m2/repository/org/springframework/cloud/spring-cloud-context/1.3.6.RELEASE/spring-cloud-context-1.3.6.RELEASE.jar!/org/springframework/cloud/bootstrap/BootstrapApplicationListener.class

The called method’s class, org.springframework.boot.builder.SpringApplicationBuilder, is available from the following locations:

jar:file:/C:/Users/Pradeep/.m2/repository/org/springframework/boot/spring-boot/3.3.1/spring-boot-3.3.1.jar!/org/springframework/boot/builder/SpringApplicationBuilder.class

The called method’s class hierarchy was loaded from the following locations:

org.springframework.boot.builder.SpringApplicationBuilder: file:/C:/Users/Pradeep/.m2/repository/org/springframework/boot/spring-boot/3.3.1/spring-boot-3.3.1.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.cloud.bootstrap.BootstrapApplicationListener and org.springframework.boot.builder.SpringApplicationBuilder

Which Version of Spring cloud and Spring Boot to use to solve the error

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT