2017-08-30 28 views

回答

0

你必須實現你自己的方法。

我建議你看看: https://docs.spring.io/spring-data/data-commons/docs/1.6.1.RELEASE/reference/html/repositories.html 它顯示瞭如何使用CrudRepositories實現自定義請求。

再看看有:https://docs.spring.io/spring-data/data-commons/docs/1.6.1.RELEASE/reference/html/repositories.html

根據文檔,如果你的日期字段被稱爲「的startDate」,你有一個名爲todayDate你可以創建一些東西,看起來像這樣今天0AM的日期對象:

yourRepository.findByStartDateAfter(todayDate)

不能幫助你更多,因爲沒有很多的相關信息...