Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of ty

搭建框架的时候遇见这么一个错误

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.etoak.repository.LoginoutMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

这个问题的原因就是在于在配置文件中没有相关的解析mapper的配置

解决办法:


    
        
        
    
要注意:第二个注解使用name的方式找到SqlsessionFactory

你可能感兴趣的:(【经验】)