zoukankan      html  css  js  c++  java
  • IbatisNet orm框架探视

    <?xml version="1.0" encoding="utf-8"?>
    <sqlMapConfig xmlns="http://ibatis.apache.org/dataMapper"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
    
    <!-- 常量属性,通过单独文件properties.config加载-->
    <properties resource="properties.config"/>
    <!-- 常量属性,通过程序集资源中 加载
    <properties embedded="database.config, IBatisNetDemo"/>-->
    
    <settings>
    <setting useStatementNamespaces="${useStatementNamespaces}"/>
    <setting cacheModelsEnabled="true"/>
    <setting validateSqlMap="false"/>
    </settings>
    
    <!-- 数据驱动提供类配置文件的路径和文件名 -->
    <providers resource="providers.config"/>
    
    <!-- 设置数据库连接信息	-->
    <database>
    <provider name="${provider}"/>
    <dataSource name="IBatisNetTest" connectionString="${connectionString}"/>
    </database>
    
    <!-- 指定项目内映射的文件的位置-->
    <sqlMaps>
    <!-- 从程序集中
    <sqlMap embedded="${root}Person.xml,${assembly}" />-->
    <!-- 从文件中-->
    <!--<sqlMap resource="@Maps/Person.xml" />-->
    
    <sqlMap resource="Person.xml" />
    </sqlMaps>
    </sqlMapConfig>
    

      

    <?xml version="1.0" encoding="utf-8" ?>
    <settings>
      <!--<!—应用程序和配置属性设置-->-->
      <add key="provider" value="sqlServer2.0" />
      <add key="connectionString"	  value="server=192.168.1.110;database=NPetShop;uid=at;pwd=at@2012" />
      <add key="root" value="IBatisNetTest.Maps." />
      <add key="assembly" value="IBatisNetTest" />
    
      <add key="userid" value="at" />
      <add key="password" value="at@2012" />
      <add key="database" value="NPetShop" />
      <add key="datasource" value="192.168.1.110" />
      <add key="selectKey" value="select @@IDENTITY as value" />
      <add key="directory" value="Maps" />
      <add key="useStatementNamespaces" value="false" />
    </settings>
    

      

    https://files.cnblogs.com/chenli0513/WebApplication5.zip

  • 相关阅读:
    G 面经 && Leetcode: Longest Repeating Character Replacement
    Leetcode: Reconstruct Original Digits from English
    Leetcode: Maximum XOR of Two Numbers in an Array
    Leetcode: Battleships in a Board
    Leetcode: Find All Anagrams in a String
    Leetcode: Pacific Atlantic Water Flow
    Leetcode: Partition Equal Subset Sum
    Leetcode: Third Maximum Number
    Leetcode: Arithmetic Slices
    Leetcode: Trapping Rain Water II
  • 原文地址:https://www.cnblogs.com/chenli0513/p/3108385.html
Copyright © 2011-2022 走看看