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/

Reply via email to