草庐IT

QuerydslPredicate

全部标签

java - Spring @QuerydslPredicate 问题

使用的库SpringBoot1.3.2.RELEASE查询DSL3.7.2QueryDSLMaven插件1.1.3hibernate4.3.11.Final问题目前,我有一个SpringBoot应用程序,它具有一些使用SpringDataJPA(由Hibernate支持)的基本CRUD功能,并使用SpringDataEnvers进行审计。我还有以下端点可从中检索实体列表:http://localhost:8080/test-app/list现在,我想使用newQueryDSLsupportthatSpringoffers通过@QuerydslPredicate注解。这适用于大多数字段或

java - QuerydslPredicate 和泛型类

我有许多具有相同方法的Controller,区别仅在于实体类。我想创建通用的BaseController并且在使用QuerydslPredicate注释时遇到问题(无法设置根,这是通用的)classabstractBaseController{@AutowiredprivateRepositoryrepository;@RequestMapping(method=RequestMethod.GET)publicPagefindAll(@QuerydslPredicatePredicatepredicate,Pageablepageable){returnrepository.findA