错误

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘roleController’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sks.service.RoleService com.sks.controller.RoleController.roleService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.sks.service.RoleService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

Spring错误Error creating bean with name ‘roleController‘

解决方法

大多数情况下这种类型的错误是因为在dao层和servie没有加入对应的注解出现的问题,检查是否加入注解即可。

相关文章:

  • 2021-09-25
  • 2021-04-03
  • 2021-06-17
  • 2021-04-14
  • 2021-12-04
  • 2021-05-19
  • 2021-05-01
  • 2021-05-22
猜你喜欢
  • 2021-10-24
  • 2021-06-22
  • 2021-06-19
  • 2021-11-08
  • 2022-01-02
  • 2021-08-30
  • 2021-08-15
相关资源
相似解决方案