在Controller层无法注入Service层的对象

来源:互联网 发布:ardupilot 源码 分析 编辑:程序博客网 时间:2024/06/05 05:14

Q: ringframework.beans.factory.BeanCreationException: Error creating bean with name ‘registAction’: Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire field: public com.communication.biz.impl.RegistImpl com.communication.action.RegistAction.registImpl;
nested exception is java.lang.IllegalArgumentException:Can not set com.communication.biz.impl.RegistImpl field com.communication.action.RegistAction.registImpl to com.sun.proxy.$Proxy17
A: 在@Autowired自动注入时, 只能用接口不能用接口的实现类。

原创粉丝点击