在尝试调用我的方法时获得以下错误: org.springframework.data.domain.Sort.by(Lorg/springframework/data/domain/Sort$Direction;[Ljava/lang/String;)Lorg/springframework/data/domain/Sort;:findAll( recordLimit,recordOffset,Sort.by(DESC,MODIFIED_DATE))
使用SpringData-Commons-2.1.3 RELEASE.jar
以下是pom的相关部分:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons-core</artifactId>
<version>1.4.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
</dependency>发布于 2022-09-14 19:47:00
您指的是spring-data-commons和spring-data-commons-core,后者非常非常老。它有一个冲突的类Sort,它是在运行时使用的,而不是您希望/需要从spring-data-commons获得的类。
删除对spring-data-commons-core和重新构建的依赖关系。
https://stackoverflow.com/questions/73720328
复制相似问题