把你的配置文件也贴出来看看。提示sessionFactory注入不正确,有可能是你没有继承Spring提供的hibernate类,看看你的baseRoleDAO对应的类或超类是否继承了HibernateDaoSupport。

解决方案 »

  1.   

    问题在这里 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?查一查就知道了
      

  2.   

    sessionFactory注入错误,首先确定你的BO是否使用了Spring提供的hibernate模板类,如果使用了,可能是你的配置文件问题,如果没有使用,确定你的BO(可能是baseRoleDAO)是否提供了'sessionFactory' 的注入方法,例如setter,静态工厂等,如果提供,再检查你的配置文件
      

  3.   

    呵呵  这个忘了结帖了
    帮忙看看这个
    http://community.csdn.net/Expert/topic/4311/4311602.xml?temp=.7460443