Annotation Interface UseSpelInvoker
@Target({TYPE,METHOD,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Inherited
@Documented
public @interface UseSpelInvoker
Indicates that a POJO handler method (
@ServiceActivator, @Transformer,
etc.,
or such methods invoked from XML definitions) should be invoked using SpEL.
In versions prior to 5.0, such methods were always invoked using SpEL. In 5.0, the
framework switched to using
InvocableHandlerMethod
instead
which is generally more efficient than (interpreted) SpEL.
There may be some unanticipated corner case where it is necessary to revert to using SpEL. Also, for very high performance requirements, you may wish to consider using compiled SpEL which is often the fastest solution (when the expression is compilable).
Applying this annotation to those methods will cause SpEL to be used for the
invocation. An optional compilerMode
property (aliased to value) is also provided.
- Since:
- 5.0
- Author:
- Gary Russell
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionSpecify that the annotated method (or methods in the annotated class) will be invoked using SpEL instead of anInvocableHandlerMethod
with the specified compilerMode.Specify that the annotated method (or methods in the annotated class) will be invoked using SpEL instead of anInvocableHandlerMethod
with the specified compilerMode.
-
Element Details
-
value
Specify that the annotated method (or methods in the annotated class) will be invoked using SpEL instead of anInvocableHandlerMethod
with the specified compilerMode. If left empty, the default runtime compiler mode will be used. Must evaluate to a String containing a valid compiler mode.- Returns:
- The compilerMode.
- See Also:
- Default:
- ""
-
compilerMode
Specify that the annotated method (or methods in the annotated class) will be invoked using SpEL instead of anInvocableHandlerMethod
with the specified compilerMode. If left empty, the default runtime compiler mode will be used. Must evaluate to a String containing a valid compiler mode.- Returns:
- The compilerMode.
- See Also:
- Default:
- ""
-