spring property resolution from a spring expression -


i want resolve property , specify name of property using spel expression. if this

<property name="host" value="#{t(...constants).sink_prop_host}" /> 

the value gets resolved correctly sink.host value of constant. taking step further

<property name="host" value="${#{t(...constants).sink_prop_host}}" /> 

this doesn't works. ideas how can make work. should function same

<property name="host" value="${sink.host}" /> 

you can't that, because properties resolved before spel (you can other way around).

this works...

public class foo {      public static final string foo = "foo.prop";  }   <util:properties id="props">     <prop key="foo.prop">bar</prop> </util:properties>  <bean id="xx" class="foo.bar">     <property name="foo" value="#{props[t(foo.foo).foo]}"/> </bean> 

you can, of course, load "props" bean file.