以下是ibatis的 SqlMap里面的配置
Oracle
<transactionManager type="JDBC" commitRequired="false"> <dataSource type="SIMPLE"> <property name="JDBC.Driver" value="oracle.jdbc.driver.OracleDriver"/> <property name="JDBC.ConnectionURL" value="jdbc:oracle:thin:@10.40.33.181:1521:ora181"/> <property name="JDBC.Username" value="user"/> <property name="JDBC.Password" value="userpw"/> </dataSource> </transactionManager>
MySQL
<transactionManager type="JDBC" commitRequired="false"> <dataSource type="SIMPLE"> <property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/> <property name="JDBC.ConnectionURL" value="jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8"/> <property name="JDBC.Username" value="user"/> <property name="JDBC.Password" value="userpw"/> </dataSource> </transactionManager>