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

这个问题好奇怪
struts+spring+hibernate开发
下面的是我的applicationContext.xml配置文件
<?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.microsoft.jdbc.sqlserver.SQLServerDriver </value>
              </property>
              <property   name= "jdbcUrl ">
                    <value> jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=blog </value>
              </property>
              <property   name= "properties ">
                        <props>
                                <prop   key= "c3p0.acquire_increment "> 5 </prop>
                                <prop   key= "c3p0.idle_test_period "> 100 </prop>
                                <prop   key= "c3p0.max_size "> 100 </prop>
                                <prop   key= "c3p0.max_statements "> 0 </prop>
                                <prop   key= "c3p0.min_size "> 10 </prop>
                                <prop   key= "user "> sa </prop>
                                <prop   key= "password "> 123456789 </prop>
                        </props>
                </property>
        </bean>
<bean   id= "sessionfactory "
class= "org.springframework.orm.hibernate3.LocalSessionFactoryBean ">
<property   name= "dataSource ">
<ref   bean= "datasource "   />
</property>
<property   name= "hibernateProperties ">
<props>
<prop   key= "hibernate.dialect ">
org.hibernate.dialect.SQLServerDialect
</prop>
<prop   key= "hibernate.show_sql "> true </prop>
</props>
</property>
<property   name= "mappingResourc