diff --git a/src/main/java/io/ebean/config/ServerConfig.java b/src/main/java/io/ebean/config/ServerConfig.java index 28728cd22..51221e96f 100644 --- a/src/main/java/io/ebean/config/ServerConfig.java +++ b/src/main/java/io/ebean/config/ServerConfig.java @@ -1956,6 +1956,16 @@ public class ServerConfig { this.durationWithNanos = durationWithNanos; } + /** + * Set to true to run DB migrations on server start. + *
+ * This is the same as serverConfig.getMigrationConfig().setRunMigration(). We have added this method here + * as it is often the only thing we need to configure for migrations. + */ + public void setRunMigration(boolean runMigration){ + migrationConfig.setRunMigration(runMigration); + } + /** * Set to true to generate the "create all" DDL on startup. *
diff --git a/src/main/java/io/ebean/config/properties/PropertiesLoader.java b/src/main/java/io/ebean/config/properties/PropertiesLoader.java index 560d255e5..3df479919 100644 --- a/src/main/java/io/ebean/config/properties/PropertiesLoader.java +++ b/src/main/java/io/ebean/config/properties/PropertiesLoader.java @@ -56,17 +56,6 @@ public class PropertiesLoader { return properties; } - /** - * Set (override) a configuration property. - * - * This is expected to be only called by test configuration logic - * (ala automatic test configuration via ebean-test-config). - */ - public static synchronized void setProperty(String key, String value) { - load(); - properties.setProperty(key, value); - } - /** * Return a copy of the properties with 'eval' run on all the values. * This resolves expressions like ${HOME} etc. diff --git a/src/main/java/io/ebeaninternal/server/core/DefaultContainer.java b/src/main/java/io/ebeaninternal/server/core/DefaultContainer.java index 7f4d94422..e1e923dea 100644 --- a/src/main/java/io/ebeaninternal/server/core/DefaultContainer.java +++ b/src/main/java/io/ebeaninternal/server/core/DefaultContainer.java @@ -83,7 +83,7 @@ public class DefaultContainer implements SpiContainer { ServerConfig config = new ServerConfig(); config.setName(name); - config.loadFromProperties(PropertiesLoader.load()); + config.loadFromProperties(); return createServer(config); }