Checks autowiring problems in a bean class.

问题描述:

   idea在做springboot项目时,dao层获取数据报错:

    Checks autowiring problems in a bean class.

问题分析:

     意思是bean没注入,我反复查看了service和dao层,发现dao层上少了注解@Repository

解决:

    


@Repository
@Mapper
    public interface MiaoshaUserDao {
	@Select("select * from miaosha_user where mobile=#{mobile}")
    public MiaoshaUser getByMoblie(@Param("mobile") String mobile);
}
发布了193 篇原创文章 · 获赞 30 · 访问量 11万+

猜你喜欢

转载自blog.csdn.net/yiye2017zhangmu/article/details/95025903