版权声明:来自技术分享,QQ475651575 https://blog.csdn.net/weixin_42045591/article/details/82455743
问题:出现UserRePository注入创建失败,一定先检查所有的@注解是否已经标记
问题发现:entity下的实体类上面没有加注解
@Entity @Data @Table(name = "user") public class User { |
任何基于hibernate的实体类一定要加上@Entity注解!