jdbc dao 注入 dataSource 失败

来源:互联网 发布:淘宝什么字体是免费的 编辑:程序博客网 时间:2024/06/04 18:24

今天在改连接池的时候,jdbcTemplate  jdbc dao 注入 dataSource 失败

报了如下错误

 Bean property 'dataSource' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?


<bean id="appoDao" class="com.mf.erp.duilian.appo.dao.impl.AppoDao">
<property name="dataSource" ref="dataSource"/>
 </bean>


后来找到错误发现dao 没有extends JdbcDaoSupport , 注意这个dao 有可能是extends 了一个baseDao 


baseDao  extends JdbcDaoSupport  最终继承的是JdbcDaoSupport 

0 0