Created
November 26, 2013 07:52
-
-
Save yanhua365/7654771 to your computer and use it in GitHub Desktop.
Spring JPA中的各种数据库连接配置
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- H2的混合模式 --> | |
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> | |
<property name="driverClassName" value="org.h2.Driver" /> | |
<!--<property name="url" value="jdbc:h2:~/databases/mydb" />--> | |
<property name="url" value="jdbc:h2:file://D:\h2\mydb;AUTO_SERVER=TRUE;USER=SA;" /> | |
</bean> | |
<!-- H2的内存模式 --> | |
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> | |
<property name="driverClassName" value="org.h2.Driver" /> | |
<property name="url" value="jdbc:h2:mem:mydb;USER=SA;" /> | |
</bean> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment