I have a Java class MySettings which loads the properties for my application from a JSON file / database / something else.
I have configured MySettings to be a bean in the Spring context.
<bean id="mySettings" class="com.myapp.MySettings" />
I now want to use one of the values in mySettings in the spring context file for something that doesn’t support SpEL, like the Spring Integration logging channel adapter, e.g.
<int:logging-channel-adapter id="logMessageToRemote"
logger-name="toRemote" level="#{mySettings.getRemoteLogLevel}"
expression="payload" />
Is there a way I can setup a “property” that can be populated using SpEL?
from spring docs http://static.springsource.org/spring/docs/3.0.5.RELEASE/reference/expressions.html#expressions-beandef
You can also refer to other bean properties by name, for example.
Is this something you are looking for?