tomcat启动时候出现的错误原文
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'sessionFactory' of bean class [demo.spring.HelloWorldImpl]: Bean property 'sessionFactory' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1031)错误解决Bean property 'sessionFactory' is not writable or has an invalid setter method用到HerbernateTemplate的时候,该类需 extends HibernateDaoSupport,就是在DAO类中需要 extends HibernateDaoSupport。