日期:2014-05-18  浏览次数:20575 次

大家看下我配的spring文件,提点建议
<?xml   version= "1.0 "   encoding= "UTF-8 "?>
<!DOCTYPE   beans   PUBLIC   "-//SPRING//DTD   BEAN//EN "   "http://www.springframework.org/dtd/spring-beans.dtd ">

<beans>
  <bean   id= "dataSource "   class= "com.mchange.v2.c3p0.ComboPooledDataSource "   destroy-method= "close ">
            <property   name= "driverClass ">
                <value> com.mysql.jdbc.Driver </value>
            </property>
            <property   name= "jdbcUrl ">
                <value> jdbc:mysql://localhost:3306/new_log?characterEncoding=gbk </value>
            </property>
            <property   name= "properties ">
                <props>
                        <prop   key= "c3p0.minPoolSize "> 1 </prop>  
                        <prop   key= "hc3p0.maxPoolSize "> 10 </prop>  
                        <prop   key= "hc3p0.timeout "> 60 </prop>  
                        <prop   key= "c3p0.max_statement "> 50 </prop>  
                        <prop   key= "c3p0.testConnectionOnCheckout "> true </prop>  
                        <prop   key= "hibernate.c3p0.testConnectionOnCheckout "> false </prop>
                        <prop   key= "user "> root </prop>  
                        <prop   key= "password "> </prop>
                </props>
            </property>
        </bean>
       
      <bean   id= "sessionFactory "
                class= "org.springframework.orm.hibernate3.LocalSessionFactoryBean "   singleton= "true ">
               
              <property   name= "dataSource "> <ref   local= "dataSource "/> </property>
               
              <property   name= "mappingResources ">
                        <list>