数据库连接配置 - 示例

    <bean id="oracleDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
        destroy-method="close">
        <property name="driverClass" value="${db.driverClassName}" />
        <property name="jdbcUrl" value="${db.url}" />
        
        <property name="acquireIncrement" value="10" />
        <property name="acquireRetryAttempts" value="5" />
        <property name="acquireRetryDelay" value="500" />
         <!--  <property name="checkoutTimeout" value="3000" />-->
        <property name="initialPoolSize" value="10" />
        <property name="maxPoolSize" value="50" />
        <property name="properties" ref="dataSourceProperties" />
        <property name="testConnectionOnCheckout" value="true"/>
        <property name="testConnectionOnCheckin" value="false"/> 
        <property name="preferredTestQuery" value="SELECT 1 from dual"/>
    </bean>

 

你可能感兴趣的:(spring)