VIVO-978 Move developer.properties into the config sub-directory.
This commit is contained in:
parent
31c10db442
commit
a7a894606b
3 changed files with 12 additions and 9 deletions
|
@ -266,13 +266,13 @@
|
||||||
<copy todir="${vitrohome.image.dir}" >
|
<copy todir="${vitrohome.image.dir}" >
|
||||||
<fileset dir="${appbase.dir}/config" >
|
<fileset dir="${appbase.dir}/config" >
|
||||||
<include name="example.runtime.properties" />
|
<include name="example.runtime.properties" />
|
||||||
<include name="example.developer.properties" />
|
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<mkdir dir="${vitrohome.image.dir}/config" />
|
<mkdir dir="${vitrohome.image.dir}/config" />
|
||||||
<copy todir="${vitrohome.image.dir}/config" >
|
<copy todir="${vitrohome.image.dir}/config" >
|
||||||
<fileset dir="${appbase.dir}/config" >
|
<fileset dir="${appbase.dir}/config" >
|
||||||
<include name="example.applicationSetup.n3" />
|
<include name="example.applicationSetup.n3" />
|
||||||
|
<include name="example.developer.properties" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${vitrohome.image.dir}" >
|
<copy todir="${vitrohome.image.dir}" >
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
#
|
#
|
||||||
# Runtime properties for developer mode.
|
# Runtime properties for developer mode.
|
||||||
#
|
#
|
||||||
# If the developer.properties file is present in your VIVO home directory, it
|
# If the developer.properties file is present in the config sub-directory of
|
||||||
# will be loaded as VIVO starts up, taking effect immediately.
|
# 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
|
# Each of these properties can be set or changed while VIVO is running, but it
|
||||||
# can be convenient to set them in advance.
|
# can be convenient to set them in advance.
|
||||||
|
|
|
@ -28,10 +28,10 @@ import edu.cornell.mannlib.vitro.webapp.startup.StartupStatus;
|
||||||
*
|
*
|
||||||
* Start with an empty settings map.
|
* Start with an empty settings map.
|
||||||
*
|
*
|
||||||
* The Setup class will read "developer.properties" from the Vitro home
|
* The Setup class will read "developer.properties" from the "config"
|
||||||
* directory, and load its settings. If the file doesn't exist, or doesn't
|
* sub-directory of the Vitro home directory, and load its settings. If the file
|
||||||
* contain values for certain properties, those propertiew will keep their
|
* doesn't exist, or doesn't contain values for certain properties, those
|
||||||
* default values.
|
* properties will keep their default values.
|
||||||
*
|
*
|
||||||
* An AJAX request can be used to update the properties. If the request has
|
* 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
|
* 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);
|
StartupStatus ss = StartupStatus.getBean(ctx);
|
||||||
DeveloperSettings devSettings = DeveloperSettings.getInstance();
|
DeveloperSettings devSettings = DeveloperSettings.getInstance();
|
||||||
|
|
||||||
Path homeDir = ApplicationUtils.instance().getHomeDirectory().getPath();
|
Path homeDir = ApplicationUtils.instance().getHomeDirectory()
|
||||||
File dsFile = homeDir.resolve("developer.properties").toFile();
|
.getPath();
|
||||||
|
File dsFile = homeDir.resolve("config/developer.properties")
|
||||||
|
.toFile();
|
||||||
|
|
||||||
try (FileReader reader = new FileReader(dsFile)) {
|
try (FileReader reader = new FileReader(dsFile)) {
|
||||||
Properties dsProps = new Properties();
|
Properties dsProps = new Properties();
|
||||||
|
|
Loading…
Add table
Reference in a new issue