Changed the way to get the DB url
This commit is contained in:
parent
3bac5f159c
commit
d1c996dec7
|
@ -12,13 +12,11 @@ public class RecordToDBConnection {
|
|||
|
||||
private static final Logger logger = LoggerFactory.getLogger(RecordToDBConnection.class);
|
||||
|
||||
public static final String URL_PROPERTY_KEY = "url";
|
||||
public static final String URL_PROPERTY_KEY = "URL";
|
||||
public static final String DB_SUFFIX = "-db";
|
||||
public static final String USERNAME_SUFFIX = "-username";
|
||||
public static final String PASSWORD_SUFFIX = "-password";
|
||||
|
||||
private final String baseURL;
|
||||
private final String dbName;
|
||||
private final String url;
|
||||
private final String username;
|
||||
private final String password;
|
||||
|
@ -29,11 +27,7 @@ public class RecordToDBConnection {
|
|||
protected RecordToDBConnection(String type, Class<? extends Record> clz, PersistenceBackendConfiguration configuration) throws Exception {
|
||||
this.clz = clz;
|
||||
this.typeName = type;
|
||||
|
||||
this.baseURL = configuration.getProperty(URL_PROPERTY_KEY);
|
||||
this.dbName = configuration.getProperty(typeName+DB_SUFFIX);
|
||||
this.url = baseURL + "/" + dbName;
|
||||
|
||||
this.url = configuration.getProperty(typeName+DB_SUFFIX);
|
||||
this.username = configuration.getProperty(typeName+USERNAME_SUFFIX);
|
||||
this.password = configuration.getProperty(typeName+PASSWORD_SUFFIX);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue