INT-3874: Copy spel-functions from parent ctx

JIRA: https://jira.spring.io/browse/INT-3874

Previously the `IntegrationEvaluationContextFactoryBean` copied only those spel-functions which are defined
as beans in the ctx. Those which are specified through the `setFunctions` hasn't been copied from parent ctx to child.

This fix addresses and issue.
This commit is contained in:
Artem Bilan
2015-11-03 16:51:45 -05:00
parent 9918304954
commit 7edef1d9f1
4 changed files with 38 additions and 13 deletions

View File

@@ -57,7 +57,7 @@ In the above example, the custom function is a static method `calc` on class `My
Say you have a `Message` with a payload that has a type `MyFoo` on which you need to perform some action to create a `MyBar` object from it, and you then want to invoke a custom function `calc` on that object.
The standard property accessors wouldn't know how to get a `MyBar` from a `MyFoo` so you could write and configure a custom property accessor to do so.
So, your final expression might be`"#barcalc(payload.myBar)"`.
So, your final expression might be `"#barcalc(payload.myBar)"`.
The factory bean has another property `typeLocator` which allows you to customize the `TypeLocator` used during SpEL evaluation.
This might be necessary when running in some environments that use a non-standard `ClassLoader`.