我有一Template
门课有几个领域(id,name,description,created,modified....)
并可以按创建日期过滤,如下所示:
public interface TemplateRepository extends JpaRepository<Template, Long> {
Page<Template> findAllByCreatedBetween(OffsetDateTime createdStart, OffsetDateTime createdEnd, Pageable pageable);
}
我的例子是这样的:
ExampleMatcher exampleMatcher = ExampleMatcher.matchingAll()
.withIgnoreCase()
.withStringMatcher(ExampleMatcher.StringMatcher.CONTAINING)
.withIgnoreNullValues()
.withIgnorePaths("id");
Example<Template> templateExample = Example.of(requestTemplate, exampleMatcher);
有没有可能将示例添加到方法中的findAllByCreatedBetween
方法?