用JdbcDaoSupport整合出现的问题
action: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sdao' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'datasource' of bean class [dao.StudentDAO]: 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?
org.springframework.beans.NotWritablePropertyException: Invalid property 'datasource' of bean class [dao.StudentDAO]: 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?
Servlet /SpringHibenate1 threw load() exception
我在写public class StudentDAO extends JdbcDaoSupport implements IStudentDAO{
JdbcTemplate jt=this.getJdbcTemplate();
就出现这问题了,配置那里没有弄错的,搜了好久了
[解决办法]
把你的配置、代码提出来
好像说的是set方法不对
[解决办法]
很明显啊,sdao里没配置datasouse属性。
LZ应该:在文件[/WEB-INF/applicationContext.xml]的sdao(<bean>)注入datasourse