Ibatis+Spring+webwork搭建框架所遇到的问题
问题:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in class path resource [applicationContext-service-user.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: sqlMapClient is required
Caused by: java.lang.IllegalArgumentException: sqlMapClient is required
我的配置 :
<bean id="sqlMapClient" value="classpath:sql-map-config.xml"/>
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="baseDao" ref="baseDao"></property>
</bean>
IbatisBaseDao.java代码:
public class IbatisBaseDao extends SqlMapClientDaoSupport {
}
所要引用的代码:
public class UserServiceImpl extends SqlMapClientDaoSupport implements UserService {
protected IbatisBaseDao dao;
只要把extends SqlMapClientDaoSupport 去掉就OK了
问题待续中……
我的异常网推荐解决方案:org.springframework.beans.factory.BeanCreationException:,http://www.myexception.cn/j2ee/10759.html