Error creating bean with name报错
程序员文章站
2022-07-14 21:13:11
...
Unsatisfied dependency expressed through field 'mapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.grg.platform.pvac.attendance.mapper.AttendanceDailyMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
解决方法:经检查代码中,controller、Service层以及Dao层分别都有@controller、@Service、@Dao注解以及@autowired注解,排除没有注解导致的问题,在启动类,添加
@MapperScan("com.grg.platform.pvac.attendance.mapper")
重新启动项目,问题解决。
推荐阅读
-
Error creating bean with name 'entityManagerFactory' defined in class path resource解决方案
-
Error creating bean with name ‘eduChapterController‘: Unsatisfied dependency expressed through field
-
UnsatisfiedDependencyException: Error creating bean with name ‘xxxx‘:
-
springMVC常见错误-解决org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.spring
-
Error creating bean with name
-
Error creating bean with name 'eurekaAutoServiceRegistration'
-
Error creating bean with name报错
-
Error creating bean with name dfdatasource
-
Error creating bean with name ‘sqlSessionFactory‘
-
BeanCreationException: Error creating bean with name ‘requestMappingHandlerAdapter‘