1.在intellij idea中添加Hibernate support

在file->setting->plugins搜索Hibernate 

选中Hibernate support和Persistence frameworks Support-----打勾✔

(如果,该贴完美解决你的问题,请点一个赞?谢谢!)