spring data jpa where静态类
本文介绍了spring data jpa where静态类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
import static org.springframework.data.mongodb.core.query.Criteria.where;
import static org.springframework.data.mongodb.core.query.Query.query;
这是mongodb的包,
但是我没知道 spring data jpa 的 where等。 但是官方这样的 :
List<Customer> customers = customerRepository.findAll(
where(isLongTermCustomer())
这个where包位置在哪里 ?
解决方案
spring data 还有个给mongodb的项目。 maven加上spring-boot-starter-data-mongodb试试
这篇关于spring data jpa where静态类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文