#java #spring-boot #rest #maven #pom.xml
Вопрос:
У меня проблема с загрузкой Java spring, я думаю, что проблема с версией, но я не мог понять ее точно, она работала нормально, но затем она показывает это сообщение после нескольких запусков. это ошибка, она продолжает проявляться:
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
java.lang.invoke.MethodHandleNatives.resolve(Native Method)
The following method did not exist:
org.springframework.scheduling.concurrent.ExecutorConfigurationSupport.setAwaitTerminationMillis(J)V
The method's class, org.springframework.scheduling.concurrent.ExecutorConfigurationSupport, is available from the following locations:
jar:file:/C:/Users/R/Downloads/demo (2) - Copy/demo/lib/spring-context-5.2.3.RELEASE.jar!/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.class
jar:file:/C:/Users/R/.m2/repository/org/springframework/spring-context/5.2.15.RELEASE/spring-context-5.2.15.RELEASE.jar!/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.class
The class hierarchy was loaded from the following locations:
org.springframework.scheduling.concurrent.ExecutorConfigurationSupport:
file:/C:/**/lib/spring-core-5.2.3.RELEASE.jar
file:/C:/**/lib/spring-core-5.2.3.RELEASE.jar
file:/C:/**/lib/spring-core-5.2.3.RELEASE.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.scheduling.concurrent.ExecutorConfigurationSupport
……………………..
Это моя зависимость в pom.xml:
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.12.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>8</java.version>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.springframework.data/spring-data-jpa -->
<dependency>
<groupId> org.springframework.data </groupId>
<artifactId> spring-data-jpa </artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
есть ли что-то не так с моими зависимостями?