https://www.jianshu.com/p/e20eb9645ce9?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation - [Editor]Idea常见问题整理
https://blog.csdn.net/gaotiedun1/article/details/89319104 - 使用IDEA开发Mybatis在编写mapper文件出现 expected, got'***' 错误
最后想说一句,有些报错以上的博客都没有解决。。
/**
* 查询最新更新的小说
*
* @param pageable
* @return
*/
@Query(value = "select chapter.novelId as novelId, chapter.chapterId as chapterId, chapter.chapterName as lastChapterName, chapter.createdDate as createdDate, " +
"novel.cover as cover, novel.novelName as novelName, novel.universeId as universeId, novel.universeName as universeName, " +
"author.pseudonym as pseudonym, author.headImage as headImage from NovelChapter chapter left join Novel novel on chapter.novelId=novel.novelId " +
"left join Author author on chapter.authorId=author.authorId " +
"where novel.status = 1 and chapter.status=1 and novel.isDelete=0 and novel.isFrozen=false " +
"group by chapter.novelId order by chapter.createdDate DESC limit 1", nativeQuery = true)
Page<Map> findLatestUpdateNovel(Pageable pageable);
例如JPA中,如果漏写了value,nativeQuery也会以上报错。。