【发布时间】:2015-10-28 13:25:41
【问题描述】:
我刚刚从 spring 3.2 更新到 spring 4.0.0.RC2 但现在我得到了以下期望
org.springframework.beans.factory.NoSuchBeanDefinitionException
运行测试时在我的 dao 类上。自动装配 PersistenceContext(这是我们自己的泛型类)时失败。
@Repository
public class AccountDaoImpl extends AbstractDao<Account> implements AccountDao {
@Autowired
public AccountDaoImpl(final PersistenceContext<Account> context) {
super(context);
}
...
如果我将版本改回 3.2,一切正常。导致此问题的 4.0 有何不同?
【问题讨论】:
-
请发布完整的堆栈跟踪和
PersistenceContext的 bean 定义。
标签: spring