idea中使用jpa的查询报can't resolve symbol

来源:互联网 发布:淘宝网如何打造爆款 编辑:程序博客网 时间:2024/06/03 19:36
@Query("SELECT b FROM Blog b WHERE b.blogUser.userId=?1")Page<Blog> findBlogPageByCatalogId(Long userId, Pageable pageable);
比如这句话,编译器无法识别 Blog.can't resolve symbol
解决办法:Go to File > Project Structure > Facets. Then click on the + icon and add JPA to your project/module. After you've done this, you can select a Default JPA Provider. 
转自:https://stackoverflow.com/questions/12420996/intellij-idea-highlights-entity-class-names-with-cannot-resolve-symbol-in-jp
 
原创粉丝点击