需要在 repository 中 定义这样的方法 :findAllByOrderByUpdatedAtDesc()
public List findAllByOrderByUpdatedAtDesc();
重要:(中间要多加一个By)
findAllByOrderByUpdatedAtDesc();
The little ‘By’ does all the magic.
需要在 repository 中 定义这样的方法 :findAllByOrderByUpdatedAtDesc()
public List findAllByOrderByUpdatedAtDesc();
重要:(中间要多加一个By)
findAllByOrderByUpdatedAtDesc();
The little ‘By’ does all the magic.