是否可以将List对象用作jpa查询方法的参数,如下所示
List<String> aList = new ArrayList<>();
aList.add("test"); //and pretend there is a few more elements in the list.
repository.countDistinctByTitleIsContainingIgnoreCase(aList);
其中方法定义为:
int countDistinctByTitleIsContainingIgnoreCase(List<String> aList)
这是查询方法中的一些其他信息
https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query-methods