From a7a894606b16944d9ffa7f5bd711ada5e6a3a456 Mon Sep 17 00:00:00 2001 From: Jim Blake Date: Mon, 23 Feb 2015 12:16:18 -0500 Subject: [PATCH] VIVO-978 Move developer.properties into the config sub-directory. --- webapp/build.xml | 2 +- webapp/config/example.developer.properties | 5 +++-- .../webapp/utils/developer/DeveloperSettings.java | 14 ++++++++------ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/webapp/build.xml b/webapp/build.xml index 8af20cc7c..1e915eecc 100644 --- a/webapp/build.xml +++ b/webapp/build.xml @@ -266,13 +266,13 @@ - + diff --git a/webapp/config/example.developer.properties b/webapp/config/example.developer.properties index dd108909f..f064f05a9 100644 --- a/webapp/config/example.developer.properties +++ b/webapp/config/example.developer.properties @@ -3,8 +3,9 @@ # # Runtime properties for developer mode. # -# If the developer.properties file is present in your VIVO home directory, it -# will be loaded as VIVO starts up, taking effect immediately. +# If the developer.properties file is present in the config sub-directory of +# your VIVO home directory, it will be loaded as VIVO starts up, taking effect +# immediately. # # Each of these properties can be set or changed while VIVO is running, but it # can be convenient to set them in advance. diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/developer/DeveloperSettings.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/developer/DeveloperSettings.java index 36dc530a4..50c38815f 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/developer/DeveloperSettings.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/developer/DeveloperSettings.java @@ -28,10 +28,10 @@ import edu.cornell.mannlib.vitro.webapp.startup.StartupStatus; * * Start with an empty settings map. * - * The Setup class will read "developer.properties" from the Vitro home - * directory, and load its settings. If the file doesn't exist, or doesn't - * contain values for certain properties, those propertiew will keep their - * default values. + * The Setup class will read "developer.properties" from the "config" + * sub-directory of the Vitro home directory, and load its settings. If the file + * doesn't exist, or doesn't contain values for certain properties, those + * properties will keep their default values. * * An AJAX request can be used to update the properties. If the request has * multiple values for a property, the first value will be used. If the request @@ -196,8 +196,10 @@ public class DeveloperSettings { StartupStatus ss = StartupStatus.getBean(ctx); DeveloperSettings devSettings = DeveloperSettings.getInstance(); - Path homeDir = ApplicationUtils.instance().getHomeDirectory().getPath(); - File dsFile = homeDir.resolve("developer.properties").toFile(); + Path homeDir = ApplicationUtils.instance().getHomeDirectory() + .getPath(); + File dsFile = homeDir.resolve("config/developer.properties") + .toFile(); try (FileReader reader = new FileReader(dsFile)) { Properties dsProps = new Properties();