在Spring Data Jpa的@Query注解中使用limit条件会报错,原因是Jpa的@Query中写的sql叫JPQL,并不是原生的sql语句
JPQL
解决方案
@Query(nativeQuery=true,value = "") //value里写正常sql语句
:D 获取中...