114的数据库连接

jdbc.properties

# Properties file with JDBC-related settings.
# Applied by PropertyPlaceholderConfigurer from "dataAccessContext-local.xml".
# Targeted at system administrators, to avoid touching the context XML files.

# jdbc.driverClassName=org.hsqldb.jdbcDriver
# jdbc.url=jdbc:hsqldb:hsql://localhost:9002
# jdbc.username=sa
# jdbc.password=

jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc:oracle:thin:@10.17.37.207:1521:vnet
jdbc.username=vnet
jdbc.password=vnet

DateAccessContext-jta.xml(部分)

<!-- ========================= RESOURCE DEFINITIONS ========================= -->

<!-- Main JNDI DataSource for J2EE environments -->
<!-- Refers to the main database -->
    <jee:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/vnetds"/>

<!-- SqlMap setup for iBATIS Database Layer -->
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation" value="WEB-INF/sql-map-config.xml"/>
<property name="dataSource" ref="dataSource"/>
</bean>


DateAccessContext-local.xml(部分)


<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:@10.17.37.207:1521:vnet"/>
<property name="username" value="vnet"/>
<property name="password" value="vnet"/>
</bean>

<!-- Transaction manager for a single JDBC DataSource -->
<!-- (see dataAccessContext-jta.xml for an alternative) -->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>

<!-- SqlMap setup for iBATIS Database Layer -->
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation" value="WEB-INF/sql-map-config.xml"/>
<property name="dataSource" ref="dataSource"/>
</bean>

你可能感兴趣的:(oracle,xml,jdbc,ibatis,HSQLDB)