问题原因 Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: bookinfo is not mapped,sql语句中的表名应该是实体类名. 问题解决 @Query("select bookid, bookname, bookauthor, bookprice, bookstore from BookInfo b where b.bookname = ?1,将表名改为实体类名就好了. Bug重现 org.springf…