Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.sh.shiro.dao.ConfirmRepo' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
先说解决方法:
实体类上添加 @Entity,解决
找半天原因,说bean没有注入,以为是ConfirmRepo这个类没有注入成功,各种尝试,两个小时候过后依然报错,最后检查代码,发现实体类没有添加@Entity,添加后正常启动