主题:[讨论]关于springframework+ibatis的配置问题
我用的是springframework+ibatis,在applicationContext.xml文件中配置了数据源,同时也
<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
<property name="configLocation">
<value>classpath:sqlMap-config.xml</value>
</property>
<property name="dataSource">//数据源
<ref bean="dataSource" />
</property>
</bean>
然后我再
<bean id="ajaxDAO" class="com.doone.app.rpt.nowebwork.AJAXDao">
<description>ffsg</description>
<property name="sqlMapClient">
<ref bean="sqlMapClient" />
</property>
</bean>
com.doone.app.rpt.nowebwork.AJAXDao是我自己写的类,继承
org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
奇怪的是:启动时,有走setSqlMapClient()方法,但是我应用时却出现没有指定的sqlMapClient。。。请问怎么解决???
<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
<property name="configLocation">
<value>classpath:sqlMap-config.xml</value>
</property>
<property name="dataSource">//数据源
<ref bean="dataSource" />
</property>
</bean>
然后我再
<bean id="ajaxDAO" class="com.doone.app.rpt.nowebwork.AJAXDao">
<description>ffsg</description>
<property name="sqlMapClient">
<ref bean="sqlMapClient" />
</property>
</bean>
com.doone.app.rpt.nowebwork.AJAXDao是我自己写的类,继承
org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
奇怪的是:启动时,有走setSqlMapClient()方法,但是我应用时却出现没有指定的sqlMapClient。。。请问怎么解决???