cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: New Features for the spring configurator
Date Mon, 26 Feb 2007 09:42:19 GMT
Leszek Gawron wrote:

> 
> The perfect situation for me would be to have a 
> ProfileAwarePropertyPlaceholderConfigurer that could be used like that:
> 
>> 	<bean id="placeholderConfig" class="org.apache.cocoon.spring.ProfileAwarePropertyPlaceholderConfigurer">
>> 		<property name="runningMode" value="${org.apache.cocoon.mode}"/>
>> 	</bean>
> and running the application with -Dorg.apache.cocoon.mode=dev
> 
> Is there any chance that this functionality could be separated? It would 
>   be even better if this code was directly ported to spring framework.
> 
Ah, ok I see, this is possible:

<bean id="placeholderConfig"
class="org.apache.cocoon.spring.configurator.SettingsBeanFactoryPostProcessor"
init-method="init">
	<property name="runningMode" value="${org.apache.cocoon.mode}"/>
</bean>

You can even skip the runningMode property, it uses the system property
by default.

Carsten
-- 
Carsten Ziegeler
http://www.osoco.org/weblogs/rael/

Mime
View raw message