0
点赞
收藏
分享

微信扫一扫

No qualifying bean of type ‘crud.services.EmployeeService‘ available

禾木瞎写 2022-03-11 阅读 134
javaspring

在做SSM整合时,在controller层的EmployeeController想自动注入service层的EmployeeService,但是注入失败。测试时就出现了那个异常。

然后单独在applicationContext.xml中为它注入,但是@Autowired注解也不可以删去。

<bean class="crud.services.EmployeeService"/>

然后程序就能跑了。

举报

相关推荐

0 条评论