需要在 repository 中 定义这样的方法 :findAllByOrderByUpdatedAtDesc()
public List findAllByOrderByUpdatedAtDesc();
重要:(中间要多加一个By)
findAllByOrderByUpdatedAtDesc();
The little ‘By’ does all the magic.
---------------------
作者:remote_roamer
来源:CSDN
原文:https://blog.csdn.net/remote_roamer/article/details/51460869?utm_source=copy
版权声明:本文为博主原创文章,转载请附上博文链接!