类注入报错

应给是因为spring中特殊字符导致的问题:

<aop:pointcut id="allManagerMethod" expression="execution(* com.hupun.xxx.manager..*.*(..))"/>

manager包名修改成其他的都可以.

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyManagerClient': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'ecrmCompanyManager' must be of type [com.hupun.console.service.company.manager.impl.EcrmCompanyManager], but was actually of type [com.sun.proxy.$Proxy37]

at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:306)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1120)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

猜你喜欢

转载自fengbin2005.iteye.com/blog/2342968