问题:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'user
Service' 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" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation" value="classpath:sql-map-config.xml"/>
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="baseDao" class="com.tnt.ebr.sys.service.IbatisBaseDao">
<property name="sqlMapClient"><ref local="
sqlMapClient"/></property>
</bean>
<bean id="userService" class="com.tnt.ebr.sys.service.impl.UserServiceImpl">
<property name="dao" ref="
baseDao"></property>
</bean>
IbatisBaseDao.java代码:
public class IbatisBaseDao extends
SqlMapClientDaoSupport {
}
所要引用的代码:
public class UserServiceImpl
extends SqlMapClientDaoSupport implements UserService {
protected IbatisBaseDao dao;
只要把extends SqlMapClientDaoSupport 去掉就OK了
问题待续中……