首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏大内老A

    开发自己的Data Access Application Block[上篇]

    ; if (configurationElement == null) { throw new Exception("It ); database.DefaultCommandType = configurationElement.DedaultCommandType; Type dbParameterNameMappingType = Type.GetType(configurationElement.DbParameterNameMapping); ); database.DefaultCommandType = configurationElement.DedaultCommandType; Type dbParameterNameMappingType = Type.GetType(configurationElement.DbParameterNameMapping);

    83190发布于 2018-02-07
  • 来自专栏全栈程序员必看

    配置元素customErrors[通俗易懂]

    ElementInformation 获取包含 ConfigurationElement 对象的不可自定义的信息和功能的 ElementInformation 对象。 (从 ConfigurationElement 继承。) Errors 获取 CustomError 对象的集合,也就是其下面的<error>配置节。 (从 ConfigurationElement 继承。) LockAllElementsExcept 获取被锁定的元素的集合。 (从 ConfigurationElement 继承。) (从 ConfigurationElement 继承。) LockElements 获取被锁定的元素的集合。 (从 ConfigurationElement 继承。) (从 ConfigurationElement 继承。) Mode 获取或设置错误显示模式。

    1.8K10编辑于 2022-09-13
  • 来自专栏sofu456

    winform config配置

    Properties.Settings访问 configsections xml节点:ConfigurationSection、ConfigurationElementCollection xml属性:ConfigurationElement ArcingMonitor.Config.ArcingConfigSection,ArcingMonitor" /> </sectionGroup> section定义节点和代码添加的节点没有关系 public class ArcingConfig : ConfigurationElement

    80320发布于 2020-04-08
  • 来自专栏.Net Core技术分享

    创建自定义配置节点(web.config和app.config都适用)

    System.Configuration; namespace SampleWebConfigSection.Configuration { public class baseSection : ConfigurationElement public string url { get { return (string)base["url"]; } set { url = value; } } } }   派生自ConfigurationElement public class fileUploadSection : ConfigurationElementCollection { protected override ConfigurationElement )] public int size { get { return (int)this["size"]; } set { size = value; } } } }   派生自ConfigurationElement ------------------------------ ps.补充一点Configuration自定义节点结构: ConfigurationSection:对应整个自定义节点Xml的最外层节点 ConfigurationElement

    1.5K20发布于 2019-09-26
  • 来自专栏Java技术进阶

    《从Java面试题来看源码》,Dao 接口的工作原理

    configuration.isResourceLoaded(resource)) {       configurationElement(parser.evalNode("/mapper"));        configuration.addLoadedResource(resource);       //注册 Mapper 接 口       bindMapperForNamespace();     }     //处理 configurationElement  ()方法中解析失败的<resultMap>节点     parsePendingResultMaps();     //处理 configurationElement ()方法中 解析失败的< cache-ref >节点     parsePendingCacheRefs();     //处理 configurationElement ()方法中 解析失败的 SQL 语句节点     parsePendingStatements

    55610编辑于 2022-12-02
  • 来自专栏JAVA开发专栏

    Mybatis中Dao接口的工作原理

    configuration.isResourceLoaded(resource)) { configurationElement(parser.evalNode("/mapper")); configuration.addLoadedResource(resource); //注册 Mapper 接 口 bindMapperForNamespace(); } //处理 configurationElement ()方法中解析失败的<resultMap>节点 parsePendingResultMaps(); //处理 configurationElement ()方法中 解析失败的< cache-ref >节点 parsePendingCacheRefs(); //处理 configurationElement ()方法中 解析失败的 SQL 语句节点 parsePendingStatements

    72751编辑于 2022-11-21
  • 来自专栏技术博客

    App.config和Web.config配置文件的自定义配置节点

    { this["Password"] = value; } } } } } 第二种情况比第一种情况的区别就是,数据类型也是自己定义的,具体的配置属性写在ConfigurationElement value="Leo"></add> <add key="3" value="Lynn"></add> </Test4> </configuration> 为每个集合中的参数项创建一个从ConfigurationElement protected override ConfigurationElement CreateNewElement() { return new MyKeyValueSetting (); } protected override object GetElementKey(ConfigurationElement element) { { base.BaseRemove(name); } } public class MyKeyValueSetting : ConfigurationElement

    1.6K30发布于 2018-08-31
  • 来自专栏技术博客

    App.config和Web.config配置文件的自定义配置节点

    { this["Password"] = value; } } } } } 第二种情况比第一种情况的区别就是,数据类型也是自己定义的,具体的配置属性写在ConfigurationElement value="Leo"></add> <add key="3" value="Lynn"></add> </Test4> </configuration> 为每个集合中的参数项创建一个从ConfigurationElement protected override ConfigurationElement CreateNewElement() { return new MyKeyValueSetting (); } protected override object GetElementKey(ConfigurationElement element) { { base.BaseRemove(name); } } public class MyKeyValueSetting : ConfigurationElement

    2.2K10发布于 2019-02-25
  • 来自专栏大内老A

    [ASP.NET Web API]如何Host定义在独立程序集中的Controller

    class AssemblyElementCollection : ConfigurationElementCollection 17: { 18: protected override ConfigurationElement return new AssemblyElement(); 21: } 22: protected override object GetElementKey(ConfigurationElement serviceTypeElement.AssemblyName; 26: } 27: } 28: 29: public class AssemblyElement : ConfigurationElement

    1.5K90发布于 2018-01-15
  • 来自专栏大内老A

    通过自定义配置实现插件式设计

    比如ConfigurationSection、ConfigurationElement、ConfigurationElementCollection等。 顾名思义,NameTypeConfigurationElement就是具有两个基本配置属性Name和Type的配置元素(ConfigurationElement),其定义如下。 1: public class NameTypeConfigurationElement : ConfigurationElement 2: { 3: [ConfigurationProperty ConfigurationElementCollection where T : NameTypeConfigurationElement 2: { 3: protected override ConfigurationElement return Activator.CreateInstance<T>(); 6: } 7: protected override object GetElementKey(ConfigurationElement

    95190发布于 2018-02-07
  • 来自专栏多线程

    MyBatis源码阅读(三) --- 配置信息的解析以及SqlSessionFactory构建过程

    configuration.isResourceLoaded(resource)) { //解析所有的mapper子标签 configurationElement(parser.evalNode 详细代码如下: //org.apache.ibatis.builder.xml.XMLMapperBuilder#configurationElement //configurationElement( ):解析的是Mapper.xml的标签 private void configurationElement(XNode context) { try { //获取到namespace命名空间 四、Mapper接口与MapperProxyFactory的绑定过程 前面我们分析了XMLMapperBuilder的parse()方法对mapper接口的解析过程,在执行完configurationElement 小总结: XMLMapperBuilder.parse()方法,是对 Mapper接口的解析,里面有两个方法: (1)configurationElement():解析所有的子标签,最终解析Mapper.xml

    47510编辑于 2023-12-22
  • 来自专栏大内老A

    来源于WCF的设计模式:可扩展对象模式[下篇]

    NamConfigurationElement则是我自定义的一个包含“name”配置属性的ConfigurationElement。 name) 4: { 5: return (T)this.BaseGet(name); 6: } 7: protected override ConfigurationElement return Activator.CreateInstance<T>(); 10: } 11: protected override object GetElementKey(ConfigurationElement 而RoomConfigurationElement则代表一个具体的Room的配置,除了具有一个名称(继承自ConfigurationElement)之外,它余下的配置就是XxxBuilder的集合了。

    84390发布于 2018-02-07
  • 来自专栏Java架构师必看

    mybatis(错误一) 项目启动时报“Result Maps collection already contains value forxxx”的解决方案

    xyx.dsw.dao.mapper.admin.quotationwish.TempTestTableMapper.TempTestTableResult at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement xyx.dsw.dao.mapper.admin.quotationwish.TempTestTableMapper.TempTestTableResult at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement xyx.dsw.dao.mapper.admin.quotationwish.TempTestTableMapper.TempTestTableResult at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement xyx.dsw.dao.mapper.admin.quotationwish.TempTestTableMapper.TempTestTableResult at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement xyx.dsw.dao.mapper.admin.quotationwish.TempTestTableMapper.TempTestTableResult at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement

    2.5K20发布于 2021-05-31
  • 来自专栏后端技术学习

    mybatis中如何解析动态sql的

    其追踪过程: XMLMapperBuilder#parse->XMLMapperBuilder#configurationElement#buildStatementFromContext#parseStatementNode configuration.isResourceLoaded(resource)) { //配置元素 重要 configurationElement(parser.evalNode(" parsePendingCacheRefs(); parsePendingStatements(); } 可以看到xpath的解析的结果是XNode对象: //配置元素 private void configurationElement

    2.9K10发布于 2021-03-04
  • 来自专栏大内老A

    WCF服务的批量寄宿

    ServiceTypeElementCollection : ConfigurationElementCollection 16: { 17: protected override ConfigurationElement return new ServiceTypeElement(); 20: } 21: protected override object GetElementKey(ConfigurationElement serviceTypeElement.ServiceType.MetadataToken; 25: } 26: } 27: public class ServiceTypeElement : ConfigurationElement

    832100发布于 2018-01-15
  • 来自专栏wayn的程序开发

    Mybatis占位符#{}和${}的区别?源码解读(二)

    buildSqlSessionFactory() 会遍历所有 mapperLocations(xml文件) 调用 xmlMapperBuilder.parse()解析,源码如下 图片 在 parse() 方法中, Mybatis 通过 configurationElement configuration.isResourceLoaded(resource)) { // xml文件解析逻辑 configurationElement(parser.evalNode parsePendingResultMaps(); parsePendingCacheRefs(); parsePendingStatements(); } private void configurationElement

    1.5K81编辑于 2023-02-09
  • 来自专栏后端进阶

    Mybatis源码分析之Mapper注册与绑定

    configuration.isResourceLoaded(resource)) { /** * 1.解析xml中的节点信息,并生成 MappedStatement */ configurationElement XMLMapperBuilder.configurationElement(XNode context) private void configurationElement(XNode context)

    1.2K30发布于 2019-06-14
  • 来自专栏IT技术精选文摘

    面试题:请描述下Mybatis加载mapper文件的流程

    configurationElement函数几乎解析了mapper节点下所有子节点,至此mybaits解析了mapper中的所有节点,并将其加入到了Configuration对象中提供给sqlSessionFactory

    93520发布于 2019-07-05
  • 来自专栏波波烤鸭

    一文帮你搞定MyBatis的类型转换模块,深度好文,欢迎一键三连!!!

    >> configurationElement(parser.evalNode("/mapper")); configuration.addLoadedResource(resource 一个namespace 一个 MapperProxyFactory >> bindMapperForNamespace(); // 注册 Mapper 接口 } // 处理 configurationElement 方法中解析失败的 <resultMap> 节点 parsePendingResultMaps(); // 处理 configurationElement 方法中解析失败的 <cache-ref > 节点 parsePendingCacheRefs(); // 处理 configurationElement 方法中解析失败的 SQL 语句节点 parsePendingStatements (); } 进入configurationElement方法中。

    1.9K30发布于 2021-09-08
  • 来自专栏.NET开发那点事

    .NET 配置文件简单使用

    方法2: 继承ConfigurationSection类,配合ConfigurationProperty特性来实现 public class ObjectContainerElement : ConfigurationElement

    88090发布于 2018-01-04
领券