首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

spring链接数据库applicationContext.xml配备

2013-03-25 
spring链接数据库applicationContext.xml配置?xml version1.0 encodingUTF-8?beans xmlnshttp:

spring链接数据库applicationContext.xml配置
<?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:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<!-- oracle 数据源配置-->

<bean id="dataSource" value="oracle.jdbc.driver.OracleDriver" />
<property name="jdbcUrl" value="jdbc:oracle:thin:@0.0.0.0:1521:ORCL2" />
<property name="user" value="ynyc" />
<property name="password" value="ynyc" />
<property name="maxIdleTime" value="1800" />
</bean>

<bean id="todoDao" />
</property>
</bean>

<bean id="todoService" />
</property>
</bean>

</beans>

热点排行