2016-02-29 62 views
4

我想在我的倉庫界面中添加其找到所有比long publishdata值數據和Decreacingly定購的方法:如何使用排序依據與GREATERTHAN春天JPA

我嘗試這樣做,但它似乎並不要工作:

@Repository 
public interface NoticiaRepository extends CrudRepository<Noticia,Long>{ 

    Noticia findById(long id); 
    List<Noticia> findByOrderPublishdateGreaterThanDesc(long publishdate); 

} 

回答

9
List<Noticia> findByPublishdateGreaterThanOrderByPublishdateDesc(Long publishdate)