Ability to override default datasource with java parameter.

This commit is contained in:
Ryszard-Trojnacki
2015-04-02 08:23:33 +02:00
parent 0a15cdd7b2
commit a192b0cdbf
@@ -46,7 +46,13 @@ class PrimaryServer {
if (globalProperties == null) {
globalProperties = PropertyMap.defaultProperties();
}
defaultServerName = globalProperties.getProperty("datasource.default");
defaultServerName = System.getProperty("datasource.default");
if(defaultServerName == null) {
defaultServerName = System.getProperty("ebean.default.datasource");
}
if(defaultServerName == null) {
defaultServerName = globalProperties.getProperty("datasource.default");
}
if (defaultServerName == null) {
defaultServerName = globalProperties.getProperty("ebean.default.datasource");
}