它正确地解析和创建了REST端点,但是我得到的PersistentEntity不能是null!访问REST时的消息和异常:
java.lang.IllegalArgumentException: PersistentEntity must not be null!是空的。这意味着我的实体没有注册。我想这是因为它们不是常规的JPA实体,它们只通过存储库链接到数据层。
我创建了一个小的spring引导项目,通过spring数据rest从mongoDb检索一个示例对象,其中包含一个Seq (vavr集合)。在启动应用程序之后,它马上就不工作了。首先,我必须做一个插入,然后它可以调用teh的rest端点。: Could not write JSON: Couldn't find PersistentEntity for type class io.vavr.collection.List$Cons!; nest
我在我的应用程序中使用Spring数据rest。PersistentEntity must not be null我怎么解决这个问题?@Query("select DISTINCT term from ForbiddenTerm")
List<TestTerm> findDistinctByTerm();
我有一个简单的Spring应用程序,它包含Spring数据、JPA和Spring数据Rest模块。Spring会自动公开JPA存储库,但当我向存储库中的自定义搜索方法发送HTTP请求时(该方法返回投影列表),则会得到Couldn't find PersistentEntity for type class:80) ~[spring-data-rest-webmvc-3.0
我从这个示例开始我的项目。但是,当我添加依赖spring-boot-starter-data-rest时,即使我在application.properties (和)中添加spring.data.rest.detectionStrategy=annotated,也会出现PersistentEntity must not be null!如果我在PersonRepository上尝试此@RepositoryRestResource(ex