You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by ernst Developer <er...@gmail.com> on 2013/02/21 10:42:09 UTC

external property file for core

Hi,

With SYNCOPE-244 we now have the option to use an external property file
for syncope console. That is a very useful enhancement.

I would like to have the same option for syncope core.

At the moment all property files are loaded in the syncopeContext.xml file.
I guess it is possible to add the same PropertyPlaceholderConfigurer bean
in this file, with the lowest order, and we anyone can define its own
properties in the external property file. In this way, it is possible to
use different properties, without a new build.

I think it's just adding (as in applicationContext.xml in the console):

*<bean id="systemPropertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
*
*      <property name="order" value="1"/>*
*      <property name="location"
value="file:#{(systemProperties['syncope.console.configuration'])}"/>*
*      <property name="ignoreResourceNotFound" value="true"/>*
*      <property name="ignoreUnresolvablePlaceholders" value="true"/>*
*</bean>*
*
*
And add an order property on the bean:
*<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
*

What do you think?

Regards,
Ernst

RE: external property file for core

Posted by Jan Bernhardt <jb...@talend.com>.
+1 for PropertyPlaceholders.

Best regards.
Jan


> -----Original Message-----
> From: ernst Developer [mailto:ernst.developer@gmail.com]
> Sent: Donnerstag, 21. Februar 2013 10:42
> To: dev@syncope.apache.org
> Subject: external property file for core
> 
> Hi,
> 
> With SYNCOPE-244 we now have the option to use an external property file
> for syncope console. That is a very useful enhancement.
> 
> I would like to have the same option for syncope core.
> 
> At the moment all property files are loaded in the syncopeContext.xml file.
> I guess it is possible to add the same PropertyPlaceholderConfigurer bean in
> this file, with the lowest order, and we anyone can define its own properties
> in the external property file. In this way, it is possible to use different
> properties, without a new build.
> 
> I think it's just adding (as in applicationContext.xml in the console):
> 
> *<bean id="systemPropertyConfigurer"
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfig
> urer">
> *
> *      <property name="order" value="1"/>*
> *      <property name="location"
> value="file:#{(systemProperties['syncope.console.configuration'])}"/>*
> *      <property name="ignoreResourceNotFound" value="true"/>*
> *      <property name="ignoreUnresolvablePlaceholders" value="true"/>*
> *</bean>*
> *
> *
> And add an order property on the bean:
> *<bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfig
> urer">
> *
> 
> What do you think?
> 
> Regards,
> Ernst