peng1990
2016-04-16 11:07
为什么我将代理类注入到测试用的service的时候报错啊,错误内容:
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]
Dao和Service的<bean>配置中包名没有改过来
ExchangeService 要用接口类
@Resource(name="exchangeServiceProxy")
private ExchangeChangeService exchangeService
Bean named 'exchangeServiceProxy' must be of type [org.springframework.transaction.interceptor.TransactionProxyFactoryBean], but was actually of type [$Proxy15] 是不是导包错误呀 还有就是你的prop的key不再是transfer了,哈哈,这里你需要改成自己的方法啦~
Spring事务管理
87319 学习 · 204 问题
相似问题