我的报错在在controller包的Controller类,就是:
@Autowired
private IHelloService helloService;
这里会报错,后来看到这个文章的提示,检查了一下component-scan,才发现没有对com.services.imple进行扫描,加上去就解决了。
1 |
<context:component-scan base-package="com.controller,com.services.impl,com.dao.impl,com.pojo" /> |