spring的问题
异常如下:
junit.framework.AssertionFailedError: Exception in constructor: testAddItem (org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'itemManager' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
Caused by: java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
....more
applicationContext.xml 中的dao 的配置如下:
<bean id="itemDaoHibernateImpl" class="net.shopping.Dao.impl.HibernateImpl.ItemDaoHibernateImpl">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
我的dao继承了BaseDao,BaseDao继承了HibernateDaoSupport,其它的DAO都没问题,只有这个。。。
搞不懂为什么!!