jdbc配置(spring)
命名空间:xmlns:context="http://www.springframework.org/schema/context"约束路径:" http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd”
<context:property-placeholder location="classpath:druid.properties"/>
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
<property name="driverClassName" value="${driverClassName}"/>
<property name="url" value="${url}"/>
<property name="username" value="${username}"/>
<property name="password" value="${password}"/>
<property name="initialSize" value="${initialSize}"/>
<property name="maxActive" value="${maxActive}"/>
<property name="maxWait" value="${maxWait}"/>
</bean>
|
|