Spring Boot报错Error creating bean with name 'userRepository': Invocation of init method failed; nested exception

问题:出现UserRePository注入创建失败,一定先检查所有的@注解是否已经标记

问题发现:entity下的实体类上面没有加注解

 任何基于hibernate的实体类一定要加上@Entity注解!

猜你喜欢

转载自www.cnblogs.com/my-program-life/p/12079211.html