本文整理了Java中org.codehaus.cargo.container.configuration.entry.DataSource.setPassword()
方法的一些代码示例,展示了DataSource.setPassword()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataSource.setPassword()
方法的具体详情如下:
包路径:org.codehaus.cargo.container.configuration.entry.DataSource
类名称:DataSource
方法名:setPassword
暂无
代码示例来源:origin: com.atlassian.cargo-test-runner/cargo-test-runner
private static DataSource getDataSource(Properties properties, String containerId)
{
Properties serverProperties = getPropertiesForServer(properties, containerId);
DataSource dataSource = new DataSource();
dataSource.setJndiLocation(serverProperties.getProperty("cargo.datasource.jndi"));
dataSource.setDriverClass(serverProperties.getProperty("cargo.datasource.driver"));
dataSource.setUrl(serverProperties.getProperty("cargo.datasource.url"));
dataSource.setUsername(serverProperties.getProperty("cargo.datasource.username"));
dataSource.setPassword(serverProperties.getProperty("cargo.datasource.password"));
return dataSource;
}
代码示例来源:origin: codehaus-cargo/cargo
/**
* if the enclosed driver properties object is set, and also contains the user and password
* properties, set the corresponding member values.
*/
private void setCredentialsIfInsideDriverProperties()
{
if (getConnectionProperties() != null)
{
if (getConnectionProperties().containsKey("user"))
{
setUsername(getConnectionProperties().getProperty("user"));
}
if (getConnectionProperties().containsKey("password"))
{
setPassword(getConnectionProperties().getProperty("password"));
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!