<property name="configLocation" value="classpath:hibernate.cfg.xml" />  

解决方案 »

  1.   


    正解。
    还有就是hibernate.cfg.xml中的<mapping class="com.ssh.pojo.User"/>声明
    还需要在spring配置文件中声明么?
      

  2.   

    org.springframework.orm.hibernate4.LocalSessionFactoryBean内对应的加载配置文件的变量时private Resource[] configLocations;
    按照注入的概念,注入的应该是configLocations,所以你设置config当然找不到啦。
      

  3.   


    正解。
    还有就是hibernate.cfg.xml中的<mapping class="com.ssh.pojo.User"/>声明
    还需要在spring配置文件中声明么?
      

  4.   


    正解。
    还有就是hibernate.cfg.xml中的<mapping class="com.ssh.pojo.User"/>声明
    还需要在spring配置文件中声明么?不需要
      

  5.   

    最后一个问题:
    <property name="configLocation" value="classpath:hibernate.cfg.xml" /> 
    与c3p0,DBCP 哪种用的多些?
      

  6.   

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

  7.   


    正解。
    还有就是hibernate.cfg.xml中的<mapping class="com.ssh.pojo.User"/>声明
    还需要在spring配置文件中声明么?不需要最后一个问题:
    <property name="configLocation" value="classpath:hibernate.cfg.xml" /> 
    与c3p0,DBCP 哪种用的多些?
      

  8.   

    dbcp已经不怎么更新了,c3po用的多。