Annotation 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

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specify that the annotated method (or methods in the annotated class) will be invoked using SpEL instead of an InvocableHandlerMethod with the specified compilerMode.
    Specify that the annotated method (or methods in the annotated class) will be invoked using SpEL instead of an InvocableHandlerMethod with the specified compilerMode.
  • Element Details

    • value

      @AliasFor("compilerMode") String value
      Specify that the annotated method (or methods in the annotated class) will be invoked using SpEL instead of an InvocableHandlerMethod 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

      @AliasFor("value") String compilerMode
      Specify that the annotated method (or methods in the annotated class) will be invoked using SpEL instead of an InvocableHandlerMethod 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:
      ""