Java 调试错误

「已注销」 2017-05-17 09:52:30
调试时出现这样的错误,该如何解决
Unable to instantiate Action, test.NoticeAction, defined for 'ListNotice' in namespace '/notice'Error creating bean with name 'test.NoticeAction': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.gx.library.service.impl.NoticeService com.gx.library.controls.NoticeAction.noticeService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.gx.library.service.impl.NoticeService] 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)}
...全文
137 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
「已注销」 2017-05-18
  • 打赏
  • 举报
回复
引用 1 楼 pany1209 的回复:
NoSuchBeanDefinitionException: No qualifying bean of type [com.gx.library.service.impl.NoticeService]。。。。spring容器中没有这个Bean,注解有没有扫到???
Dao层、Service层、Action层该有的注解都有了,其他都可用,就 NoticeService 这一个不行!!!
李德胜1995 2017-05-17
  • 打赏
  • 举报
回复
NoSuchBeanDefinitionException: No qualifying bean of type [com.gx.library.service.impl.NoticeService]。。。。spring容器中没有这个Bean,注解有没有扫到???

50,523

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧