spring 连接oracle数据库的代码
来源:互联网 发布:io1.1鼠标淘宝哪家最好 编辑:程序博客网 时间:2024/06/05 16:02
用户名和密码要重新填:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- 数据源-->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:@localhost:1521:orcl" />
<property name="username" value="***" />
<property name="password" value="***" />
<!-- 队列中的最小等待数 -->
<property name="minIdle" value="10"></property>
<!-- 队列中的最大等待数 -->
<property name="maxIdle" value="50"></property>
<!-- 最长等待时间,单位毫秒 -->
<property name="maxWait" value="3000"></property>
<!-- 最大活跃数 -->
<property name="maxActive" value="50"></property>
<property name="initialSize" value="10"></property>
</bean>
<!-- 数据库连接 -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="configLocation" value="classpath:myBatis.xml"></property>
</bean>
<!-- 执行sql语句的工具 -->
<bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate">
<constructor-arg name="sqlSessionFactory" ref="sqlSessionFactory" />
</bean>
</beans>
阅读全文
0 0
- spring 连接oracle数据库的代码
- 连接Oracle数据库的代码
- .Net连接Oracle数据库的实现代码
- Java连接Oracle数据库的示例代码
- .Net连接Oracle数据库的实现代码
- Java连接Oracle数据库的示例代码
- Java连接Oracle数据库的示例代码
- JDBC连接数据库oracle的代码
- 连接Oracle数据库的示例代码
- Java连接Oracle数据库的示例代码
- Java连接Oracle数据库的示例代码
- 使用JDBC连接Oracle数据库和使用连接池连接Oracle数据库的代码解析
- oracle连接数据库测试代码
- oracle连接数据库测试代码
- JAVA 连接ORACLE数据库代码
- oracle连接数据库测试代码
- 连接Oracle数据库示例代码
- ODBC 连接 ORACLE数据库 代码
- CodeForces 384E Propagating tree 树状数组dfs序组合使用
- HDU
- 深度学习视觉领域常用的数据集汇总
- js 有关语法
- 动态规划求最长公共序列
- spring 连接oracle数据库的代码
- PAT 1066. Root of AVL Tree (25) 回レ!雪月AVL
- iOS 动态隐藏状态栏
- 洛谷 P3390 【模板】矩阵快速幂
- F2803X笔记——初始化与启动_#ifdef语句
- 洛谷3374 线段树2
- JavaScript类与封装
- Number Sequence(找规律,,,,,反正我没找到,递归超内存了....)
- CodeForces 735B Urbanization