今天在改连接池的时候,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