aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2016-03-16 12:22:55 +0200
committerHenri Sara <hesara@vaadin.com>2016-03-16 14:44:53 +0200
commit3ea002e67fa0745080b844c8e29a6b55e8bac27b (patch)
treea311b6df77b78767eafef42ca2a420b99db36a72 /server
parentaa2a9f7c6346357381db6f7f042ac54da382de00 (diff)
downloadvaadin-framework-3ea002e67fa0745080b844c8e29a6b55e8bac27b.tar.gz
vaadin-framework-3ea002e67fa0745080b844c8e29a6b55e8bac27b.zip
Allow system properties to override app properties (#19683)
This enables e.g. overriding the productionMode setting on a server with -DproductionMode=true. This change also allows the use of system properties prefixed with "vaadin." or the full package name of the actual servlet class. Change-Id: I196ae71f9d88222f98fe360add3e7038914b79d6
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/DefaultDeploymentConfiguration.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java b/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java
index b26e048431..1f22a9e33d 100644
--- a/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java
+++ b/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java
@@ -125,14 +125,14 @@ public class DefaultDeploymentConfiguration extends
String defaultValue) {
String val = null;
- // Try application properties
- val = getApplicationProperty(propertyName);
+ // Try system properties
+ val = getSystemProperty(propertyName);
if (val != null) {
return val;
}
- // Try system properties
- val = getSystemProperty(propertyName);
+ // Try application properties
+ val = getApplicationProperty(propertyName);
if (val != null) {
return val;
}
@@ -175,6 +175,12 @@ public class DefaultDeploymentConfiguration extends
// Try lowercased system properties
val = System.getProperty(pkgName + parameterName.toLowerCase());
+ if (val != null) {
+ return val;
+ }
+
+ // version prefixed with just "vaadin."
+ val = System.getProperty("vaadin." + parameterName);
return val;
}