sqlmap.config 配置

时间:2023-12-27 17:35:01
<?xml version="1.0" encoding="utf-8"?>
<sqlMapConfig xmlns="http://ibatis.apache.org/dataMapper" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <properties embedded="database.config,Dscf.Map"/>
  <settings>
    <setting useStatementNamespaces="false"/>
    <setting cacheModelsEnabled="true"/>
    <setting validateSqlMap="false"/>
  </settings>
  <providers  embedded="providers.config,Dscf.Map"/>
  <database>
    <provider name="${provider}"/>
    <!--本地写法-->
    <dataSource name="NPetshop" connectionString="user id=${username}; password=${password};data source=${datasource};database=${database};"/>
    <!--远程写法-->
    <!--<dataSource name="NPetshop" connectionString="user id=sa; password=1qaz2wsx;data source=.;database=p2p;"/>-->
  </database>
  <!--注册XML文件-->
  <sqlMaps>
    <!--<sqlMap resource="bin\Dscf.Dal.BasicDal\SqlMap\OperateLog.xml"/>
    <sqlMap resource="bin\Dscf.Dal.BasicDal\SqlMap\OperaterInfo.xml"/>-->
    <sqlMap embedded="Dscf.Dal.BasicDal.SqlMap.OperateLog.xml,Dscf.Dal.BasicDal"/>
    <sqlMap embedded="Dscf.Dal.BasicDal.SqlMap.OperaterInfo.xml,Dscf.Dal.BasicDal"/>
    <sqlMap embedded="Dscf.Dal.BasicDal.SqlMap.LoanProductOrder.xml,Dscf.Dal.BasicDal"/>
    <sqlMap embedded="Dscf.Dal.BasicDal.SqlMap.UserInfo.xml,Dscf.Dal.BasicDal"/>
  </sqlMaps>
</sqlMapConfig>