From: <df...@us...> - 2012-06-06 09:03:36
|
Revision: 4056 http://openutils.svn.sourceforge.net/openutils/?rev=4056&view=rev Author: dfghi Date: 2012-06-06 09:03:25 +0000 (Wed, 06 Jun 2012) Log Message: ----------- DEPLOY-13 Add the possibility to expose the server name as system property. Committed just because I've already used this in a couple of projects... Modified Paths: -------------- trunk/openutils-deployment/src/main/java/it/openutils/deployment/spring/EnvironmentPropertyConfigurer.java Modified: trunk/openutils-deployment/src/main/java/it/openutils/deployment/spring/EnvironmentPropertyConfigurer.java =================================================================== --- trunk/openutils-deployment/src/main/java/it/openutils/deployment/spring/EnvironmentPropertyConfigurer.java 2012-05-28 13:52:12 UTC (rev 4055) +++ trunk/openutils-deployment/src/main/java/it/openutils/deployment/spring/EnvironmentPropertyConfigurer.java 2012-06-06 09:03:25 UTC (rev 4056) @@ -117,6 +117,11 @@ * Set all the properties configured as system properties. */ private boolean exposeSystemProperties; + + /** + * Expose the server name as system property. + */ + private boolean exposeServerName; private String nullValue; @@ -164,6 +169,14 @@ { this.exposeSystemProperties = exposeSystemProperties; } + + /** + * Expose the server name as system property. + * @param exposeServerName <code>true</code> if you want to set the server name as system property (with the key stated in <code>serverPropertyName</code>). + */ + public void setExposeServerName(boolean exposeServerName) { + this.exposeServerName = exposeServerName; + } @Override public void setNullValue(String nullValue) @@ -225,7 +238,7 @@ if (hostname != null) { - if (exposeSystemProperties) + if (exposeSystemProperties || exposeServerName) { if (System.getProperty(serverPropertyName) != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |