日期:2014-05-17  浏览次数:20656 次

紧急求救一个spring注解问题,启动报错Error creating bean with name
我的项目使用了spring注解的方式,在每一层中做了标示,用的是@Component(name="xxx")和@Resource(name="xxx"),
但是当我启动时会报如下错误,具体原因在网上找出,应该是注入的变量必须是接口类型,但是我的已经指定为接口类型,请大家帮看下,谢谢,具体错误如下:
Java code


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uAction': Injection of resource fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uFacade': Injection of resource fields failed; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'uService' must be of type [com.xxx.xxx.xxx.xxx.IUService], but was actually of type [$Proxy32]



------解决方案--------------------

------解决方案--------------------

------解决方案--------------------