读书人

spring链接数据库applicationContext.

发布时间: 2013-03-25 15:43:04 作者: rapoo

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>

读书人网 >其他数据库

热点推荐