本文整理了Java中org.mybatis.generator.config.JDBCConnectionConfiguration.getPassword()
方法的一些代码示例,展示了JDBCConnectionConfiguration.getPassword()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDBCConnectionConfiguration.getPassword()
方法的具体详情如下:
包路径:org.mybatis.generator.config.JDBCConnectionConfiguration
类名称:JDBCConnectionConfiguration
方法名:getPassword
暂无
代码示例来源:origin: roncoo/roncoo-mybatis-generator
public Connection getConnection(JDBCConnectionConfiguration config)
throws SQLException {
Driver driver = getDriver(config);
Properties props = new Properties();
if (stringHasValue(config.getUserId())) {
props.setProperty("user", config.getUserId()); //$NON-NLS-1$
}
if (stringHasValue(config.getPassword())) {
props.setProperty("password", config.getPassword()); //$NON-NLS-1$
}
props.putAll(config.getProperties());
Connection conn = driver.connect(config.getConnectionURL(), props);
if (conn == null) {
throw new SQLException(getString("RuntimeError.7")); //$NON-NLS-1$
}
return conn;
}
代码示例来源:origin: handosme/mybatis-generator-plus
public Connection getConnection(JDBCConnectionConfiguration config)
throws SQLException {
Driver driver = getDriver(config);
Properties props = new Properties();
if (stringHasValue(config.getUserId())) {
props.setProperty("user", config.getUserId()); //$NON-NLS-1$
}
if (stringHasValue(config.getPassword())) {
props.setProperty("password", config.getPassword()); //$NON-NLS-1$
}
props.putAll(config.getProperties());
Connection conn = driver.connect(config.getConnectionURL(), props);
if (conn == null) {
throw new SQLException(getString("RuntimeError.7")); //$NON-NLS-1$
}
return conn;
}
代码示例来源:origin: cxjava/mybatis-generator-core
public Connection getConnection(JDBCConnectionConfiguration config) throws SQLException {
Driver driver = getDriver(config);
Properties props = new Properties();
if (stringHasValue(config.getUserId())) {
props.setProperty("user", config.getUserId()); //$NON-NLS-1$
}
if (stringHasValue(config.getPassword())) {
props.setProperty("password", config.getPassword()); //$NON-NLS-1$
}
if (stringHasValue(config.getRemarksReporting())) {
props.setProperty("remarksReporting", config.getRemarksReporting()); //$NON-NLS-1$
} else {
props.setProperty("remarksReporting", "true"); //$NON-NLS-1$
}
props.putAll(config.getProperties());
Connection conn = driver.connect(config.getConnectionURL(), props);
if (conn == null) {
throw new SQLException(getString("RuntimeError.7")); //$NON-NLS-1$
}
return conn;
}
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
/**
* This constructor is called when there is a JDBCConnectionConfiguration
* specified in the configuration.
*
* @param config the configuration
*/
public JDBCConnectionFactory(JDBCConnectionConfiguration config) {
super();
userId = config.getUserId();
password = config.getPassword();
connectionURL = config.getConnectionURL();
driverClass = config.getDriverClass();
otherProperties = config.getProperties();
}
内容来源于网络,如有侵权,请联系作者删除!