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

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

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

JDBCConnectionConfiguration.setDriverClass介绍

暂无

代码示例

代码示例来源: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

jdbcConfig.setDriverClass(generatorConfig.getDriverClass());
jdbcConfig.setConnectionURL(generatorConfig.getConnectionURL());
jdbcConfig.setUserId(generatorConfig.getUserName());

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

jdbcConnectionConfiguration.setUserId(JDBC_USERNAME);
jdbcConnectionConfiguration.setPassword(JDBC_PASSWORD);
jdbcConnectionConfiguration.setDriverClass(JDBC_DIVER_CLASS_NAME);
context.setJdbcConnectionConfiguration(jdbcConnectionConfiguration);

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

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

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

jdbcConnectionConfiguration.setUserId(dbDefinition.getUsername());
jdbcConnectionConfiguration.setPassword(dbDefinition.getPassword());
jdbcConnectionConfiguration.setDriverClass(dbDefinition.getDriverClass());
context.setJdbcConnectionConfiguration(jdbcConnectionConfiguration);

相关文章