报错信息:[ERROR] org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:182) : Servlet.service() for servlet [dispatcherServlet] in context with path [/springbootdemo] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: Parameter with that position [1] did not exist; nested exception is java.lang.IllegalArgumentException: Parameter with that position [1] did not exist] with root cause
java.lang.IllegalArgumentException: Parameter with that position [1] did not exist
原因:
Page<T> findStudent(Specification<T> spec,Pageable pageable);
在使用hibernate做连接查询中,映射实体VO类时,出现此错误,百度上找了好久,where条件后面加入ORDER BY ?#{#pageable},就完美解决了这个问题;