问题: 执行单元测试时报的错误 原因: 主要是SpringBoot版本原因,在低版本的SpringBoot是正常的 解决方法: 在HQL的后面加入index(低版本SpringBoot不加是可以运行的)