xiaoxiaobai250 2017-11-24 02:14 采纳率: 0%
浏览 4488

异常:BeanCreationException

我配置文件里:配置了,

@Service 和@Repository都有,为什么一直报找不到我那个service层下的dao类

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0' defined in ServletContext resource [/WEB-INF/config/jeecms-servlet-front.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'demoController': Unsatisfied dependency expressed through field 'commonService': Error creating bean with name 'commonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.sygh.dao.ICommonDao] found for dependency [com.sygh.dao.ICommonDao]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.sygh.dao.ICommonDao] found for dependency [com.sygh.dao.ICommonDao]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

  • 写回答

2条回答 默认 最新

  • qq824827715 2017-11-24 03:18
    关注

    什么注入方式 ctroller里面怎么注入的service service里面怎么注入的dao 图片说明 报的就是自动装配出问题了 应该就是哪个没有自动装配 如果不用自动装配注解 就要有私有属性service dao。。。set方法

    评论

报告相同问题?

悬赏问题

  • ¥15 删除虚拟显示器驱动 删除所有 Xorg 配置文件 删除显示器缓存文件 重启系统 可是依旧无法退出虚拟显示器
  • ¥15 vscode程序一直报同样的错,如何解决?
  • ¥15 关于使用unity中遇到的问题
  • ¥15 开放世界如何写线性关卡的用例(类似原神)
  • ¥15 关于并联谐振电磁感应加热
  • ¥60 请查询全国几个煤炭大省近十年的煤炭铁路及公路的货物周转量
  • ¥15 请帮我看看我这道c语言题到底漏了哪种情况吧!
  • ¥66 如何制作支付宝扫码跳转到发红包界面
  • ¥15 pnpm 下载element-plus
  • ¥15 解决编写PyDracula时遇到的问题