【发布时间】:2014-03-30 20:12:12
【问题描述】:
我正在尝试过滤 JPA 存储库
@RequestMapping("/search")
public String search(@ModelAttribute Person search, Model model) {
PersonSpecifications spec = new PersonSpecifications();
model.addAttribute("people", this.hotelRepository.findAll(spec.lastNameIsLike("Foo")));
return "people/list";
}
并得到以下错误
The method findAll(Iterable<Long>) in the type CrudRepository<Person,Long> is not applicable for the arguments (Specification<Person>)
请指教。谢谢!
【问题讨论】:
标签: java spring jpa spring-data spring-data-jpa