[size=medium]# Mysql: datasource connectiongString
# driverClassName = com.mysql.jdbc.Driver
# url = jdbc:mysql://127.0.0.1:3306/ssi
# username = root
# jpassword = root
#Oracle:datasource connectiongString
# driverClassName = oracle.jdbc.driver.OracleDriver
# url = jdbc:oracle:thin:@192.168.1.196:1521:orcl
# username = root
# password = root
#SQL Server 2005+:datasource connectiongString
# driverClassName = com.microsoft.sqlserver.jdbc.SQLServerDriver
# url = jdbc:sqlserver://localhost:1433;DatabaseName=gjcx;
# username = root
# password = 123
#SQL Server 2000:datasource connectiongString
# driverClassName = com.microsoft.jdbc.sqlserver.SQLServerDriver
# url = jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=gjcx;
#when you use Windows IntegratedSecurity ,the jdbc.url will be...
# url =jdbc:sqlserver://localhost:1433;DatabaseName=gjcx;integratedSecurity=true
---------------------------
或直接在配置文件中写要连接的数据库
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<settings useStatementNamespaces="true"/>
<transactionManager type="JDBC">
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="oracle.jdbc.driver.OracleDriver"/>
<property name="JDBC.ConnectionURL" value="jdbc:oracle:thin:@192.168.1.196:1521:ORCL"/>
<property name="JDBC.Username" value="root"/>
<property name="JDBC.Password" value="root"/>
</dataSource>
</transactionManager>
<sqlMap resource="com/zjapl/daomain/User.xml" />
</sqlMapConfig>[/size]
# driverClassName = com.mysql.jdbc.Driver
# url = jdbc:mysql://127.0.0.1:3306/ssi
# username = root
# jpassword = root
#Oracle:datasource connectiongString
# driverClassName = oracle.jdbc.driver.OracleDriver
# url = jdbc:oracle:thin:@192.168.1.196:1521:orcl
# username = root
# password = root
#SQL Server 2005+:datasource connectiongString
# driverClassName = com.microsoft.sqlserver.jdbc.SQLServerDriver
# url = jdbc:sqlserver://localhost:1433;DatabaseName=gjcx;
# username = root
# password = 123
#SQL Server 2000:datasource connectiongString
# driverClassName = com.microsoft.jdbc.sqlserver.SQLServerDriver
# url = jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=gjcx;
#when you use Windows IntegratedSecurity ,the jdbc.url will be...
# url =jdbc:sqlserver://localhost:1433;DatabaseName=gjcx;integratedSecurity=true
---------------------------
或直接在配置文件中写要连接的数据库
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<settings useStatementNamespaces="true"/>
<transactionManager type="JDBC">
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="oracle.jdbc.driver.OracleDriver"/>
<property name="JDBC.ConnectionURL" value="jdbc:oracle:thin:@192.168.1.196:1521:ORCL"/>
<property name="JDBC.Username" value="root"/>
<property name="JDBC.Password" value="root"/>
</dataSource>
</transactionManager>
<sqlMap resource="com/zjapl/daomain/User.xml" />
</sqlMapConfig>[/size]