mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-24 10:38:57 +00:00
#843 - Change ServerConfig name to default to "db" (prior default was null) and defaultServer to true
This commit is contained in:
@@ -75,7 +75,7 @@ public class ServerConfig {
|
||||
/**
|
||||
* The EbeanServer name.
|
||||
*/
|
||||
private String name;
|
||||
private String name = "db";
|
||||
|
||||
/**
|
||||
* Typically configuration type objects that are passed by this ServerConfig
|
||||
@@ -105,7 +105,7 @@ public class ServerConfig {
|
||||
/**
|
||||
* Set to true if this is the default/primary server.
|
||||
*/
|
||||
private boolean defaultServer;
|
||||
private boolean defaultServer = true;
|
||||
|
||||
/**
|
||||
* Set this to true to disable class path search.
|
||||
@@ -563,7 +563,7 @@ public class ServerConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set true if this EbeanServer should be registered as the "default" server
|
||||
* Set false if you do not want this EbeanServer to be registered as the "default" server
|
||||
* with the Ebean singleton.
|
||||
* <p>
|
||||
* This is only used when {@link #setRegister(boolean)} is also true.
|
||||
|
||||
@@ -14,6 +14,7 @@ public class DbMigrationConfigTest {
|
||||
ServerConfig config = new ServerConfig();
|
||||
config.setName("h2other");
|
||||
config.loadFromProperties();
|
||||
config.setDefaultServer(false);
|
||||
|
||||
DbMigrationConfig migrationConfig = config.getMigrationConfig();
|
||||
|
||||
|
||||
+2
@@ -46,6 +46,8 @@ public class TestPersistenceContextServerConfig extends BaseTestCase {
|
||||
config.loadFromProperties(properties);
|
||||
config.setPersistenceContextScope(PersistenceContextScope.QUERY);
|
||||
config.setContainerConfig(new ContainerConfig());
|
||||
config.setDefaultServer(false);
|
||||
config.setRegister(false);
|
||||
|
||||
// DataSourceConfig dataSourceConfig = new DataSourceConfig();
|
||||
// dataSourceConfig.setUsername("sa");
|
||||
|
||||
Reference in New Issue
Block a user