配置ssm项目时,提示提示在service层注入出错

配置ssm项目时,提示提示在service层注入出错,出错信息如下:大致的错误信息为:

cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘studentController’: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘studentServiceImpl’: Unsatisfied dependency expressed through field ‘studentMapper’: No qualifying bean of type [com.csair.student.dao.StudentMapper] found for dependency [com.csair.student.dao.StudentMapper]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations:

错误在于将Service的注解错误的添加到ICartService中,将注解修改到CartServiceImpl下顺利解决问题。

猜你喜欢

转载自blog.csdn.net/jasonzhoujx/article/details/80040461