标签:spring mysql sql server oracle 配置
sqlserver.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver sqlserver.url=jdbc:sqlserver://localhost:1433;database=test;integratedSecurity=false sqlserver.username=sa sqlserver.password=123456
注释:database=test,表示访问的数据库名称
jdbc.driverClassName=oracle.jdbc.driver.OracleDriver jdbc.url=jdbc:oracle:thin:@localhost:1521/orcl jdbc.username=test jdbc.password=123456
注释:orcl,oracle用户实例化名称
mysql.driverClassName=com.mysql.jdbc.Driver mysql.url=jdbc:mysql://localhost:3306/test mysql.username=root mysql.password=123456
注释:test,表示访问的数据库名称
<context:property-placeholder location="classpath:db.properties" />
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="${jdbc.driverClassName}" /> <property name="url" value="${jdbc.url}" /> <property name="username" value="${jdbc.username}" /> <property name="password" value="${jdbc.password}" /> </bean>
标签:spring mysql sql server oracle 配置
原文地址:http://blog.csdn.net/a123demi/article/details/46233747