diff --git a/common/source/java/ch/systemsx/cisd/common/spring/ExposablePropertyPlaceholderConfigurer.java b/common/source/java/ch/systemsx/cisd/common/spring/ExposablePropertyPlaceholderConfigurer.java index 2df08293c9f0463553619c0425be0fe0f0e1092d..36b25f0b72cd305d4a14809aec6bd3dd44469057 100644 --- a/common/source/java/ch/systemsx/cisd/common/spring/ExposablePropertyPlaceholderConfigurer.java +++ b/common/source/java/ch/systemsx/cisd/common/spring/ExposablePropertyPlaceholderConfigurer.java @@ -26,8 +26,8 @@ import org.springframework.core.Constants; import org.springframework.util.StringUtils; /** - * Bean that should be used instead of the {@link PropertyPlaceholderConfigurer} if you want to have - * access to the resolved properties not obligatory from the Spring context. e.g. from JSP or so. + * Bean that should be used instead of the {@link PropertyPlaceholderConfigurer} if you want to have access to the resolved properties not obligatory + * from the Spring context. e.g. from JSP or so. * * @author Christian Ribeaud */ @@ -35,10 +35,11 @@ public class ExposablePropertyPlaceholderConfigurer extends PropertyPlaceholderC { /** Standard bean name in an application context file. */ public static final String PROPERTY_CONFIGURER_BEAN_NAME = "propertyConfigurer"; - + private Properties resolvedProps; private int systemPropertiesMode = PropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_FALLBACK; + private static final Constants constants = new Constants(PropertyPlaceholderConfigurer.class); /** Returns the resolved properties. */ @@ -50,7 +51,6 @@ public class ExposablePropertyPlaceholderConfigurer extends PropertyPlaceholderC // // PropertyPlaceholderConfigurer // - @Override protected final String convertPropertyValue(final String originalValue) @@ -58,7 +58,6 @@ public class ExposablePropertyPlaceholderConfigurer extends PropertyPlaceholderC // Can handle null value return StringUtils.trimWhitespace(originalValue); } - @Override public void setSystemPropertiesModeName(String constantName) throws IllegalArgumentException @@ -85,11 +84,6 @@ public class ExposablePropertyPlaceholderConfigurer extends PropertyPlaceholderC final String keyStr = key.toString(); resolvedProps.setProperty(keyStr, getResolvedProperty(props, keyStr)); } - injectPropertiesInto(resolvedProps); - } - - protected void injectPropertiesInto(Properties properties) - { } @SuppressWarnings("deprecation") diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/coreplugin/CorePluginsInjectingPropertyPlaceholderConfigurer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/coreplugin/CorePluginsInjectingPropertyPlaceholderConfigurer.java index 46904943707330fb262a9b514383caacddff3982..ba56c8cf56788aaa5753b6cd84eebbcbead5a527 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/coreplugin/CorePluginsInjectingPropertyPlaceholderConfigurer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/coreplugin/CorePluginsInjectingPropertyPlaceholderConfigurer.java @@ -16,6 +16,7 @@ package ch.systemsx.cisd.openbis.generic.server.coreplugin; +import java.io.IOException; import java.util.Properties; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.ServiceProvider; @@ -43,8 +44,9 @@ public class CorePluginsInjectingPropertyPlaceholderConfigurer extends BasicConstant.WEB_APPS_PROPERTY); @Override - protected void injectPropertiesInto(Properties properties) + protected void loadProperties(Properties properties) throws IOException { + super.loadProperties(properties); CorePluginsUtils.addCorePluginsProperties(properties, ScannerType.AS); PluginType dssDataSources = createPluginTypeDssDataSources(); PluginType maintenanceTasks = @@ -61,8 +63,8 @@ public class CorePluginsInjectingPropertyPlaceholderConfigurer extends PluginType webapps = PLUGIN_TYPE_WEBAPPS; new CorePluginsInjector(ScannerType.AS, new IPluginType[] - { maintenanceTasks, services, customImports, queryDatabases, miscellaneous, dssDataSources, - webapps }).injectCorePlugins(properties); + { maintenanceTasks, services, customImports, queryDatabases, miscellaneous, dssDataSources, + webapps }).injectCorePlugins(properties); // Inject the web apps into jetty new JettyWebAppPluginInjector(properties).injectWebApps();