org.mybatis.generator.config.JDBCConnectionConfiguration.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(9.8k)|赞(0)|评价(0)|浏览(134)

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

JDBCConnectionConfiguration.<init>介绍

暂无

代码示例

代码示例来源:origin: roncoo/roncoo-mybatis-generator

private void parseJdbcConnection(Context context, Node node) {
  JDBCConnectionConfiguration jdbcConnectionConfiguration = new JDBCConnectionConfiguration();
  context.setJdbcConnectionConfiguration(jdbcConnectionConfiguration);
  Properties attributes = parseAttributes(node);
  String driverClass = attributes.getProperty("driverClass"); //$NON-NLS-1$
  String connectionURL = attributes.getProperty("connectionURL"); //$NON-NLS-1$
  String userId = attributes.getProperty("userId"); //$NON-NLS-1$
  String password = attributes.getProperty("password"); //$NON-NLS-1$
  jdbcConnectionConfiguration.setDriverClass(driverClass);
  jdbcConnectionConfiguration.setConnectionURL(connectionURL);
  if (stringHasValue(userId)) {
    jdbcConnectionConfiguration.setUserId(userId);
  }
  if (stringHasValue(password)) {
    jdbcConnectionConfiguration.setPassword(password);
  }
  NodeList nodeList = node.getChildNodes();
  for (int i = 0; i < nodeList.getLength(); i++) {
    Node childNode = nodeList.item(i);
    if (childNode.getNodeType() != Node.ELEMENT_NODE) {
      continue;
    }
    if ("property".equals(childNode.getNodeName())) { //$NON-NLS-1$
      parseProperty(jdbcConnectionConfiguration, childNode);
    }
  }
}

代码示例来源:origin: cxjava/mybatis-generator-core

private void parseJdbcConnection(Context context, Node node) {
  JDBCConnectionConfiguration jdbcConnectionConfiguration = new JDBCConnectionConfiguration();
  context.setJdbcConnectionConfiguration(jdbcConnectionConfiguration);
  Properties attributes = parseAttributes(node);
  String driverClass = attributes.getProperty("driverClass"); //$NON-NLS-1$
  String connectionURL = attributes.getProperty("connectionURL"); //$NON-NLS-1$
  String userId = attributes.getProperty("userId"); //$NON-NLS-1$
  String password = attributes.getProperty("password"); //$NON-NLS-1$
  jdbcConnectionConfiguration.setDriverClass(driverClass);
  jdbcConnectionConfiguration.setConnectionURL(connectionURL);
  if (stringHasValue(userId)) {
    jdbcConnectionConfiguration.setUserId(userId);
  }
  if (stringHasValue(password)) {
    jdbcConnectionConfiguration.setPassword(password);
  }
  NodeList nodeList = node.getChildNodes();
  for (int i = 0; i < nodeList.getLength(); i++) {
    Node childNode = nodeList.item(i);
    if (childNode.getNodeType() != Node.ELEMENT_NODE) {
      continue;
    }
    if ("property".equals(childNode.getNodeName())) { //$NON-NLS-1$
      parseProperty(jdbcConnectionConfiguration, childNode);
    }
  }
}

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

protected void parseJdbcConnection(Context context, Node node) {
  JDBCConnectionConfiguration jdbcConnectionConfiguration = new JDBCConnectionConfiguration();
  context.setJdbcConnectionConfiguration(jdbcConnectionConfiguration);
  Properties attributes = parseAttributes(node);
  String driverClass = attributes.getProperty("driverClass"); //$NON-NLS-1$
  String connectionURL = attributes.getProperty("connectionURL"); //$NON-NLS-1$
  jdbcConnectionConfiguration.setDriverClass(driverClass);
  jdbcConnectionConfiguration.setConnectionURL(connectionURL);
  String userId = attributes.getProperty("userId"); //$NON-NLS-1$
  if (stringHasValue(userId)) {
    jdbcConnectionConfiguration.setUserId(userId);
  }
  String password = attributes.getProperty("password"); //$NON-NLS-1$
  if (stringHasValue(password)) {
    jdbcConnectionConfiguration.setPassword(password);
  }
  NodeList nodeList = node.getChildNodes();
  for (int i = 0; i < nodeList.getLength(); i++) {
    Node childNode = nodeList.item(i);
    if (childNode.getNodeType() != Node.ELEMENT_NODE) {
      continue;
    }
    if ("property".equals(childNode.getNodeName())) { //$NON-NLS-1$
      parseProperty(jdbcConnectionConfiguration, childNode);
    }
  }
}

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

private void parseJdbcConnection(Context context, Node node) {
  JDBCConnectionConfiguration jdbcConnectionConfiguration = new JDBCConnectionConfiguration();
  context.setJdbcConnectionConfiguration(jdbcConnectionConfiguration);
  Properties attributes = parseAttributes(node);
  String driverClass = attributes.getProperty("driverClass"); //$NON-NLS-1$
  String connectionURL = attributes.getProperty("connectionURL"); //$NON-NLS-1$
  String userId = attributes.getProperty("userId"); //$NON-NLS-1$
  String password = attributes.getProperty("password"); //$NON-NLS-1$
  jdbcConnectionConfiguration.setDriverClass(driverClass);
  jdbcConnectionConfiguration.setConnectionURL(connectionURL);
  if (stringHasValue(userId)) {
    jdbcConnectionConfiguration.setUserId(userId);
  }
  if (stringHasValue(password)) {
    jdbcConnectionConfiguration.setPassword(password);
  }
  NodeList nodeList = node.getChildNodes();
  for (int i = 0; i < nodeList.getLength(); i++) {
    Node childNode = nodeList.item(i);
    if (childNode.getNodeType() != Node.ELEMENT_NODE) {
      continue;
    }
    if ("property".equals(childNode.getNodeName())) { //$NON-NLS-1$
      parseProperty(jdbcConnectionConfiguration, childNode);
    }
  }
}

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

private void parseJdbcConnection(Context context, Node node) {
  JDBCConnectionConfiguration jdbcConnectionConfiguration = new JDBCConnectionConfiguration();
  context.setJdbcConnectionConfiguration(jdbcConnectionConfiguration);
  Properties attributes = parseAttributes(node);
  String driverClass = attributes.getProperty("driverClass"); //$NON-NLS-1$
  String connectionURL = attributes.getProperty("connectionURL"); //$NON-NLS-1$
  String userId = attributes.getProperty("userId"); //$NON-NLS-1$
  String password = attributes.getProperty("password"); //$NON-NLS-1$
  jdbcConnectionConfiguration.setDriverClass(driverClass);
  jdbcConnectionConfiguration.setConnectionURL(connectionURL);
  if (stringHasValue(userId)) {
    jdbcConnectionConfiguration.setUserId(userId);
  }
  if (stringHasValue(password)) {
    jdbcConnectionConfiguration.setPassword(password);
  }
  NodeList nodeList = node.getChildNodes();
  for (int i = 0; i < nodeList.getLength(); i++) {
    Node childNode = nodeList.item(i);
    if (childNode.getNodeType() != Node.ELEMENT_NODE) {
      continue;
    }
    if ("property".equals(childNode.getNodeName())) { //$NON-NLS-1$
      parseProperty(jdbcConnectionConfiguration, childNode);
    }
  }
}

代码示例来源:origin: cxjava/mybatis-generator-core

private void parseJdbcConnection(Context context, Node node) {
  JDBCConnectionConfiguration jdbcConnectionConfiguration = new JDBCConnectionConfiguration();
  context.setJdbcConnectionConfiguration(jdbcConnectionConfiguration);
  Properties attributes = parseAttributes(node);
  String driverClass = attributes.getProperty("driverClass"); //$NON-NLS-1$
  String connectionURL = attributes.getProperty("connectionURL"); //$NON-NLS-1$
  String userId = attributes.getProperty("userId"); //$NON-NLS-1$
  String password = attributes.getProperty("password"); //$NON-NLS-1$
  jdbcConnectionConfiguration.setDriverClass(driverClass);
  jdbcConnectionConfiguration.setConnectionURL(connectionURL);
  if (stringHasValue(userId)) {
    jdbcConnectionConfiguration.setUserId(userId);
  }
  if (stringHasValue(password)) {
    jdbcConnectionConfiguration.setPassword(password);
  }
  NodeList nodeList = node.getChildNodes();
  for (int i = 0; i < nodeList.getLength(); i++) {
    Node childNode = nodeList.item(i);
    if (childNode.getNodeType() != Node.ELEMENT_NODE) {
      continue;
    }
    if ("property".equals(childNode.getNodeName())) { //$NON-NLS-1$
      parseProperty(jdbcConnectionConfiguration, childNode);
    }
  }
}

代码示例来源:origin: roncoo/roncoo-mybatis-generator

private void parseJdbcConnection(Context context, Node node) {
  JDBCConnectionConfiguration jdbcConnectionConfiguration = new JDBCConnectionConfiguration();
  context.setJdbcConnectionConfiguration(jdbcConnectionConfiguration);
  Properties attributes = parseAttributes(node);
  String driverClass = attributes.getProperty("driverClass"); //$NON-NLS-1$
  String connectionURL = attributes.getProperty("connectionURL"); //$NON-NLS-1$
  String userId = attributes.getProperty("userId"); //$NON-NLS-1$
  String password = attributes.getProperty("password"); //$NON-NLS-1$
  jdbcConnectionConfiguration.setDriverClass(driverClass);
  jdbcConnectionConfiguration.setConnectionURL(connectionURL);
  if (stringHasValue(userId)) {
    jdbcConnectionConfiguration.setUserId(userId);
  }
  if (stringHasValue(password)) {
    jdbcConnectionConfiguration.setPassword(password);
  }
  NodeList nodeList = node.getChildNodes();
  for (int i = 0; i < nodeList.getLength(); i++) {
    Node childNode = nodeList.item(i);
    if (childNode.getNodeType() != Node.ELEMENT_NODE) {
      continue;
    }
    if ("property".equals(childNode.getNodeName())) { //$NON-NLS-1$
      parseProperty(jdbcConnectionConfiguration, childNode);
    }
  }
}

代码示例来源:origin: PowerShenli/MyDog

JDBCConnectionConfiguration jdbcConfig = new JDBCConnectionConfiguration();
jdbcConfig.setDriverClass(generatorConfig.getDriverClass());
jdbcConfig.setConnectionURL(generatorConfig.getConnectionURL());

代码示例来源:origin: jeesun/oauthserver

context.addProperty(PropertyRegistry.CONTEXT_ENDING_DELIMITER, "`");
JDBCConnectionConfiguration jdbcConnectionConfiguration = new JDBCConnectionConfiguration();
jdbcConnectionConfiguration.setConnectionURL(JDBC_URL);
jdbcConnectionConfiguration.setUserId(JDBC_USERNAME);

代码示例来源:origin: huzhicheng/kite-mybatis-builder

String username = projectConfig.getUserId();
String password = projectConfig.getPassword();
JDBCConnectionConfiguration jdbcConnectionConfiguration = new JDBCConnectionConfiguration();
jdbcConnectionConfiguration.setDriverClass(driverClass);
jdbcConnectionConfiguration.setConnectionURL(connectionUrl);

代码示例来源:origin: MarkGao11520/acmen-helper

context.addProperty(PropertyRegistry.CONTEXT_ENDING_DELIMITER, "`");
JDBCConnectionConfiguration jdbcConnectionConfiguration = new JDBCConnectionConfiguration();
jdbcConnectionConfiguration.setConnectionURL(dbDefinition.getUrl());
jdbcConnectionConfiguration.setUserId(dbDefinition.getUsername());

相关文章