Spring boot 不能';找不到类型类org.springframework.data.jpa.repository.query.AbstractJpaQuery$TupleConverter$TupleBackedMap的PersistentEntity

Spring boot 不能';找不到类型类org.springframework.data.jpa.repository.query.AbstractJpaQuery$TupleConverter$TupleBackedMap的PersistentEntity,spring-boot,spring-data-jpa,spring-data-rest,Spring Boot,Spring Data Jpa,Spring Data Rest,在尝试使用查询和公开为API获取数据时,获取异常 @Repository public interface EmployeeRepository extends JpaRepository<Employee, String> { @Query(value="Select * from Employee",nativeQuery = true) @RestResource(path = "byEmp", rel = "byEmp") List<Map> findTe

在尝试使用查询和公开为API获取数据时,获取异常

@Repository
public interface EmployeeRepository extends JpaRepository<Employee, 
String> {

@Query(value="Select * from Employee",nativeQuery = true)
 @RestResource(path = "byEmp", rel = "byEmp")
 List<Map> findTest();

 }
如果我试图通过创建方法从任何其他类调用,我能够获取记录

List findTest()

java.lang.IllegalArgumentException: Couldn't find PersistentEntity for type class org.springframework.data.jpa.repository.query.AbstractJpaQuery$TupleConverter$TupleBackedMap!
    at org.springframework.data.mapping.context.PersistentEntities.lambda$getRequiredPersistentEntity$2(PersistentEntities.java:78) ~[spring-data-commons-2.0.13.RELEASE.jar:2.0.13.RELEASE]
    at java.util.Optional.orElseThrow(Optional.java:290) ~[na:1.8.0_181]
    at org.springframework.data.mapping.context.PersistentEntities.getRequiredPersistentEntity(PersistentEntities.java:77) ~[spring-data-commons-2.0.13.RELEASE.jar:2.0.13.RELEASE]
    at org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.wrap(PersistentEntityResourceAssembler.java:72) ~[spring-data-rest-webmvc-3.0.13.RELEASE.jar:3.0.13.RELEASE]
    at org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.toResource(PersistentEntityResourceAssembler.java:55) ~[spring-data-rest-webmvc-3.0.13.RELEASE.jar:3.0.13.RELEASE]
    at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.entitiesToResources(AbstractRepositoryRestController.java:110) ~[spring-data-rest-webmvc-3.0.13.RELEASE.jar:3.0.13.RELEASE]
    at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.toResources(AbstractRepositoryRestController.java:80) ~[spring-data-rest-webmvc-3.0.13.RELEASE.jar:3.0.13.RELEASE]
    at org.springframework.data.rest.webmvc.RepositorySearchController.lambda$toResource$1(RepositorySearchController.java:209) ~[spring-data-rest-webmvc-3.0.13.RELEASE.jar:3.0.13.RELEASE]
    at java.util.Optional.map(Optional.java:215) ~[na:1.8.0_181].at org.springframework.data.rest.webmvc.RepositorySearchController.toResource.