注入代理類出錯(cuò)
為什么我將代理類注入到測試用的service的時(shí)候報(bào)錯(cuò)啊,錯(cuò)誤內(nèi)容:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.deppon.service.impl.TestExchangeServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'exchangeServiceProxy' must be of type [org.springframework.transaction.interceptor.TransactionProxyFactoryBean], but was actually of type [$Proxy15]
2016-11-11
Dao和Service的<bean>配置中包名沒有改過來
2016-09-19
ExchangeService 要用接口類
@Resource(name="exchangeServiceProxy")
private ExchangeChangeService exchangeService
2016-04-16
Bean named 'exchangeServiceProxy' must be of type [org.springframework.transaction.interceptor.TransactionProxyFactoryBean], but was actually of type [$Proxy15] ? 是不是導(dǎo)包錯(cuò)誤呀 ? 還有就是你的prop的key不再是transfer了,哈哈,這里你需要改成自己的方法啦~