You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@wink.apache.org by "Harel, Lior" <li...@hp.com> on 2009/11/25 12:45:18 UTC

Configuring Custom Properties

Hi Guys,

I am having troubles using the custom properties configuration. 
We are using the spring based configuration for our resources, so I simply added the custom properties factory  & custom configurer as the documentation suggests, i.e.:
<bean id="customPropertiesFactory"
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
  <property name="locations">
    <list>
     <value>WEB-INF/qc-wink.properties</value>
    </list>
   </property>
</bean>
<bean id="customConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
   <property name="ignoreUnresolvablePlaceholders" value="true" />
   <property name="order" value="1" />
   <property name="propertiesArray">
     <list>
       <props>
     <prop key="wink.propertiesFactory">customPropertiesFactory</prop>
   </props>
  </list>
</property>
</bean>


My properties file is an exact duplicate of the default properties file, except for the wink.httpMethodOverrideHeaders property which defines the relevant headers.
Still, I get only the wink default properties.

Can you suggest why don't  I get my custom properties initialized?

Thanks,
Lior

Re: Configuring Custom Properties

Posted by Michael Elman <el...@apache.org>.
Hi Lior,

the configuration you pasted here seems to be fine. At a glance I cannot see
any problem with it.
I would suggest setting Spring log to a higher level and may be try to debug
the Spring code.

Please refer to Spring example, it contains the property override section.

Btw, you don't need to duplicate the default properties, but only to provide
the custom ones.

Hope it helps,
Michael.


On Wed, Nov 25, 2009 at 1:45 PM, Harel, Lior <li...@hp.com> wrote:

> Hi Guys,
>
> I am having troubles using the custom properties configuration.
> We are using the spring based configuration for our resources, so I simply
> added the custom properties factory  & custom configurer as the
> documentation suggests, i.e.:
> <bean id="customPropertiesFactory"
> class="org.springframework.beans.factory.config.PropertiesFactoryBean">
>  <property name="locations">
>    <list>
>     <value>WEB-INF/qc-wink.properties</value>
>    </list>
>   </property>
> </bean>
> <bean id="customConfigurer"
>
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>   <property name="ignoreUnresolvablePlaceholders" value="true" />
>   <property name="order" value="1" />
>   <property name="propertiesArray">
>     <list>
>       <props>
>     <prop key="wink.propertiesFactory">customPropertiesFactory</prop>
>   </props>
>  </list>
> </property>
> </bean>
>
>
> My properties file is an exact duplicate of the default properties file,
> except for the wink.httpMethodOverrideHeaders property which defines the
> relevant headers.
> Still, I get only the wink default properties.
>
> Can you suggest why don't  I get my custom properties initialized?
>
> Thanks,
> Lior
>

Re: Configuring Custom Properties

Posted by r_i_c <ri...@richard-cissee.de>.
The property keys have changed (i.e. the 'Spring Integration' documentation
is not up-to-date):

<prop key="winkPropertiesFactory">customPropertiesFactory</prop>

works. These keys are set in 'wink-core-context.xml'.



Harel, Lior wrote:
> 
> Hi Guys,
> 
> I am having troubles using the custom properties configuration. 
> We are using the spring based configuration for our resources, so I simply
> added the custom properties factory  & custom configurer as the
> documentation suggests, i.e.:
> <bean id="customPropertiesFactory"
> class="org.springframework.beans.factory.config.PropertiesFactoryBean">
>   <property name="locations">
>     <list>
>      <value>WEB-INF/qc-wink.properties</value>
>     </list>
>    </property>
> </bean>
> <bean id="customConfigurer"
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>    <property name="ignoreUnresolvablePlaceholders" value="true" />
>    <property name="order" value="1" />
>    <property name="propertiesArray">
>      <list>
>        <props>
>      <prop key="wink.propertiesFactory">customPropertiesFactory</prop>
>    </props>
>   </list>
> </property>
> </bean>
> 
> 
> My properties file is an exact duplicate of the default properties file,
> except for the wink.httpMethodOverrideHeaders property which defines the
> relevant headers.
> Still, I get only the wink default properties.
> 
> Can you suggest why don't  I get my custom properties initialized?
> 
> Thanks,
> Lior
> 
> 

-- 
View this message in context: http://apache-wink-users.3471013.n2.nabble.com/Configuring-Custom-Properties-tp4064441p5265153.html
Sent from the Apache Wink Users mailing list archive at Nabble.com.