I need to build a dynamic path combining a value defined in properties file with the result of a SpEL expression and can't find the right syntax to achieve that.
my situation is something like:
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:myprop.properties</value>
</list>
</property>
<property name="ignoreUnresolvablePlaceholders" value="false"/>
</bean>
<bean id="fileNameToFSTree"
class="foo.bar.FileNameToFSTree"/>
<int-file:outbound-channel-adapter id="filesOut"
auto-create-directory="true"
directory-expression="${outDir} + @fileNameToFSTree.nameToTree(payload)"
delete-source-files="true"/>
given that myprop.properties
file contains a variable outDir
, I'd like to prepend that variable in the directory-expression
of the file outbound.
apparently it regularly evaluates ${outDir}
but I got the following exception:
org.springframework.expression.spel.SpelParseException: Expression [/tmp/output + @fileNameToFSTree.nameToTree(payload)] @0: EL1070E: Problem parsing left operand
I've found no traces of that case in the docs or in the examples.
Any hint?