org.apache.ibatis.session.Configuration.setVariables()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(9.9k)|赞(0)|评价(0)|浏览(219)

本文整理了Java中org.apache.ibatis.session.Configuration.setVariables()方法的一些代码示例,展示了Configuration.setVariables()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.setVariables()方法的具体详情如下:
包路径:org.apache.ibatis.session.Configuration
类名称:Configuration
方法名:setVariables

Configuration.setVariables介绍

暂无

代码示例

代码示例来源:origin: baomidou/mybatis-plus

/**
 * 使用自己的 MybatisConfiguration
 */
private MybatisXMLConfigBuilder(XPathParser parser, String environment, Properties props) {
  super(new MybatisConfiguration());
  ErrorContext.instance().resource("SQL Mapper Configuration");
  this.configuration.setVariables(props);
  this.parsed = false;
  this.environment = environment;
  this.parser = parser;
}

代码示例来源:origin: baomidou/mybatis-plus

private void propertiesElement(XNode context) throws Exception {
  if (context != null) {
    Properties defaults = context.getChildrenAsProperties();
    String resource = context.getStringAttribute("resource");
    String url = context.getStringAttribute("url");
    if (resource != null && url != null) {
      throw new BuilderException("The properties element cannot specify both a URL and a resource based property file reference.  Please specify one or the other.");
    }
    if (resource != null) {
      defaults.putAll(Resources.getResourceAsProperties(resource));
    } else if (url != null) {
      defaults.putAll(Resources.getUrlAsProperties(url));
    }
    Properties vars = configuration.getVariables();
    if (vars != null) {
      defaults.putAll(vars);
    }
    parser.setVariables(defaults);
    configuration.setVariables(defaults);
  }
}

代码示例来源:origin: camunda/camunda-bpm-platform

private XMLConfigBuilder(XPathParser parser, String environment, Properties props) {
 super(new Configuration());
 ErrorContext.instance().resource("SQL Mapper Configuration");
 this.configuration.setVariables(props);
 this.parsed = false;
 this.environment = environment;
 this.parser = parser;
}

代码示例来源:origin: org.mybatis/mybatis

private XMLConfigBuilder(XPathParser parser, String environment, Properties props) {
 super(new Configuration());
 ErrorContext.instance().resource("SQL Mapper Configuration");
 this.configuration.setVariables(props);
 this.parsed = false;
 this.environment = environment;
 this.parser = parser;
}

代码示例来源:origin: camunda/camunda-bpm-platform

private void propertiesElement(XNode context) throws Exception {
 if (context != null) {
  Properties defaults = context.getChildrenAsProperties();
  String resource = context.getStringAttribute("resource");
  String url = context.getStringAttribute("url");
  if (resource != null && url != null) {
   throw new BuilderException("The properties element cannot specify both a URL and a resource based property file reference.  Please specify one or the other.");
  }
  if (resource != null) {
   defaults.putAll(Resources.getResourceAsProperties(resource));
  } else if (url != null) {
   defaults.putAll(Resources.getUrlAsProperties(url));
  }
  Properties vars = configuration.getVariables();
  if (vars != null) {
   defaults.putAll(vars);
  }
  parser.setVariables(defaults);
  configuration.setVariables(defaults);
 }
}

代码示例来源:origin: org.mybatis/mybatis

private void propertiesElement(XNode context) throws Exception {
 if (context != null) {
  Properties defaults = context.getChildrenAsProperties();
  String resource = context.getStringAttribute("resource");
  String url = context.getStringAttribute("url");
  if (resource != null && url != null) {
   throw new BuilderException("The properties element cannot specify both a URL and a resource based property file reference.  Please specify one or the other.");
  }
  if (resource != null) {
   defaults.putAll(Resources.getResourceAsProperties(resource));
  } else if (url != null) {
   defaults.putAll(Resources.getUrlAsProperties(url));
  }
  Properties vars = configuration.getVariables();
  if (vars != null) {
   defaults.putAll(vars);
  }
  parser.setVariables(defaults);
  configuration.setVariables(defaults);
 }
}

代码示例来源:origin: chanedi/QuickProject

private XMLConfigBuilder(XPathParser parser, String environment, Properties props) {
 super(new Configuration());
 ErrorContext.instance().resource("SQL Mapper Configuration");
 this.configuration.setVariables(props);
 this.parsed = false;
 this.environment = environment;
 this.parser = parser;
}

代码示例来源:origin: org.alfresco/alfresco-repository

private void propertiesElement(XNode context) throws Exception {
 if (context != null) {
  Properties defaults = context.getChildrenAsProperties();
  String resource = context.getStringAttribute("resource");
  String url = context.getStringAttribute("url");
  if (resource != null && url != null) {
   throw new BuilderException("The properties element cannot specify both a URL and a resource based property file reference.  Please specify one or the other.");
  }
  if (resource != null) {
   defaults.putAll(Resources.getResourceAsProperties(resource));
  } else if (url != null) {
   defaults.putAll(Resources.getUrlAsProperties(url));
  }
  Properties vars = configuration.getVariables();
  if (vars != null) {
   defaults.putAll(vars);
  }
  parser.setVariables(defaults);
  configuration.setVariables(defaults);
 }
}

代码示例来源:origin: org.apache.ibatis/ibatis-core

private void propertiesElement(XNode context) throws Exception {
 if (context != null) {
  Properties defaults = context.getChildrenAsProperties();
  String resource = context.getStringAttribute("resource");
  String url = context.getStringAttribute("url");
  if (resource != null && url != null) {
   throw new BuilderException("The properties element cannot specify both a URL and a resource based property file reference.  Please specify one or the other.");
  }
  if (resource != null) {
   defaults.putAll(Resources.getResourceAsProperties(resource));
  } else if (url != null) {
   defaults.putAll(Resources.getUrlAsProperties(url));
  }
  Properties vars = configuration.getVariables();
  if (vars != null) {
   defaults.putAll(vars);
  }
  parser.setVariables(defaults);
  configuration.setVariables(defaults);
 }
}

代码示例来源:origin: Alfresco/alfresco-repository

private void propertiesElement(XNode context) throws Exception {
 if (context != null) {
  Properties defaults = context.getChildrenAsProperties();
  String resource = context.getStringAttribute("resource");
  String url = context.getStringAttribute("url");
  if (resource != null && url != null) {
   throw new BuilderException("The properties element cannot specify both a URL and a resource based property file reference.  Please specify one or the other.");
  }
  if (resource != null) {
   defaults.putAll(Resources.getResourceAsProperties(resource));
  } else if (url != null) {
   defaults.putAll(Resources.getUrlAsProperties(url));
  }
  Properties vars = configuration.getVariables();
  if (vars != null) {
   defaults.putAll(vars);
  }
  parser.setVariables(defaults);
  configuration.setVariables(defaults);
 }
}

代码示例来源:origin: chanedi/QuickProject

private void propertiesElement(XNode context) throws Exception {
 if (context != null) {
  Properties defaults = context.getChildrenAsProperties();
  String resource = context.getStringAttribute("resource");
  String url = context.getStringAttribute("url");
  if (resource != null && url != null) {
   throw new BuilderException("The properties element cannot specify both a URL and a resource based property file reference.  Please specify one or the other.");
  }
  if (resource != null) {
   defaults.putAll(Resources.getResourceAsProperties(resource));
  } else if (url != null) {
   defaults.putAll(Resources.getUrlAsProperties(url));
  }
  Properties vars = configuration.getVariables();
  if (vars != null) {
   defaults.putAll(vars);
  }
  parser.setVariables(defaults);
  configuration.setVariables(defaults);
 }
}

代码示例来源:origin: deas/alfresco

private void propertiesElement(XNode context) throws Exception {
 if (context != null) {
  Properties defaults = context.getChildrenAsProperties();
  String resource = context.getStringAttribute("resource");
  String url = context.getStringAttribute("url");
  if (resource != null && url != null) {
   throw new BuilderException("The properties element cannot specify both a URL and a resource based property file reference.  Please specify one or the other.");
  }
  if (resource != null) {
   defaults.putAll(Resources.getResourceAsProperties(resource));
  } else if (url != null) {
   defaults.putAll(Resources.getUrlAsProperties(url));
  }
  Properties vars = configuration.getVariables();
  if (vars != null) {
   defaults.putAll(vars);
  }
  parser.setVariables(defaults);
  configuration.setVariables(defaults);
 }
}

代码示例来源:origin: org.apache.ibatis/ibatis-core

public XMLConfigBuilder(Reader reader, String environment, Properties props) {
 super(new Configuration());
 ErrorContext.instance().resource("SQL Mapper Configuration");
 this.configuration.setVariables(props);
 this.parsed = false;
 this.environment = environment;
 this.parser = new XPathParser(reader, true, new XMLMapperEntityResolver(), props);
}

代码示例来源:origin: org.alfresco/alfresco-repository

public HierarchicalXMLConfigBuilder(HierarchicalResourceLoader resourceLoader, InputStream inputStream, String environment, Properties props)
{
  super(new Configuration());
  
  // EXTENDED
  this.resourceLoader = resourceLoader;
  
  ErrorContext.instance().resource("SQL Mapper Configuration");
  this.configuration.setVariables(props);
  this.parsed = false;
  this.environment = environment;
  this.parser = new XPathParser(inputStream, true, props, new XMLMapperEntityResolver());
}

代码示例来源:origin: Alfresco/alfresco-repository

public HierarchicalXMLConfigBuilder(HierarchicalResourceLoader resourceLoader, InputStream inputStream, String environment, Properties props)
{
  super(new Configuration());
  
  // EXTENDED
  this.resourceLoader = resourceLoader;
  
  ErrorContext.instance().resource("SQL Mapper Configuration");
  this.configuration.setVariables(props);
  this.parsed = false;
  this.environment = environment;
  this.parser = new XPathParser(inputStream, true, props, new XMLMapperEntityResolver());
}

代码示例来源:origin: deas/alfresco

public HierarchicalXMLConfigBuilder(HierarchicalResourceLoader resourceLoader, InputStream inputStream, String environment, Properties props)
{
  super(new Configuration());
  
  // EXTENDED
  this.resourceLoader = resourceLoader;
  
  ErrorContext.instance().resource("SQL Mapper Configuration");
  this.configuration.setVariables(props);
  this.parsed = false;
  this.environment = environment;
  this.parser = new XPathParser(inputStream, true, props, new XMLMapperEntityResolver());
}

代码示例来源:origin: org.alfresco/alfresco-repository

configuration.setVariables(this.configurationProperties);

代码示例来源:origin: deas/alfresco

configuration.setVariables(this.configurationProperties);

代码示例来源:origin: Alfresco/alfresco-repository

configuration.setVariables(this.configurationProperties);

相关文章

Configuration类方法