mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Fix a creation bug
Ignore the failure while creating DruidDataSource.
This commit is contained in:
@@ -65,8 +65,12 @@ public class DataSourceCreator {
|
||||
String username = properties.getProperty(n + ".username");
|
||||
String password = properties.getProperty(n + ".password");
|
||||
LOG.info("Creating " + n + " with url[" + url + "] and username[" + username + "].");
|
||||
DruidDataSource dataSource = create(n, url, username, password, haDataSource);
|
||||
map.put(n, dataSource);
|
||||
try {
|
||||
DruidDataSource dataSource = create(n, url, username, password, haDataSource);
|
||||
map.put(n, dataSource);
|
||||
} catch(Exception e) {
|
||||
LOG.error("Can NOT create DruidDataSource for " + n, e);
|
||||
}
|
||||
}
|
||||
LOG.info(map.size() + " DruidDataSource(s) created. ");
|
||||
return map;
|
||||
|
||||
Reference in New Issue
Block a user