`

Spring配置数据源

 
阅读更多
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="location">
			<value>/WEB-INF/db-dataSource.properties</value>
		</property>
	</bean>
	<!-- config data source -->
	<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"
		destroy-method="close">
		<property name="driverClassName">
			<value>${driverClassName}</value>
		</property>
		<property name="url">
			<value>${url}</value>
		</property>
		<property name="username">
			<value>${username}</value>
		</property>
		<property name="password">
			<value>${password}</value>
		</property>
	</bean>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics