org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.miniprogram.miniproj.dao.AreaDaoTest': Unsatisfied dependency expressed through field 'areaDao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.miniprogram.miniproj.dao.AreaDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.imooc.demo.dao.AreaDaoTest': Unsatisfied dependency expressed through field 'areaDao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
2020-04-03
報錯,什么原因
2020-04-03
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.miniprogram.miniproj.dao.AreaDaoTest': Unsatisfied dependency expressed through field 'areaDao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.miniprogram.miniproj.dao.AreaDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2018-02-07
哎呀?找到了?DataSourceConfiguration mapperScan弄錯了?你重新寫?你的dao在哪個包下就去掃哪個
2018-02-06
同學好,指的是@Autowired標簽報錯嗎,如果是請降低idea的報警等級,這是idea spring facet的一個bug視頻里會有說明?
解決方案如下
使用IDEA工具時使用@Resource和@Autowired自動注解bean時會顯示紅色,但是項目能運行?
解決方法:?
File – Settings – Inspections。在Spring Core – Autowring for Bean Class 中將Severity的級別由之前的error改成warning。