org.springframework.data.repository.query.QueryByExampleExecutor cannot be resolved.

tech2025-10-09  3

SpringBoot 集成JPA提示如下错误信息:

The type org.springframework.data.repository.query.QueryByExampleExecutor cannot be resolved. It is indirectly referenced from required .class files

从上述的错误信息可以得知Spring-data-jpa 间接依赖org.springframework.data.repository.query.QueryByExampleExecutor 类,这个类来源于spring-data-common 包。

<!-- spring-data-jpa --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-commons</artifactId> <version>1.13.22.RELEASE</version> </dependency>

 

最新回复(0)