Announcement Announcement Module
Collapse
No announcement yet.
Exposing current user in @Publisher/@Payload context Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exposing current user in @Publisher/@Payload context

    Hey there,

    I'm just starting out with spring integration and would like to use the AOP stuff to do some basic auditing.

    Is there a way to easily expose the user set by spring-security to be available in SpEL expressions for payloads? Or would I have to wire up my own MethodInterceptor?

    Thanks

  • #2
    SpEL does provide a general mechanism for invoking static methods using the 'T' operator (where T stands for 'Type'). For example:
    Code:
    T(org.springframework.security.core.context.SecurityContextHolder).getContext()

    Comment


    • #3
      Thanks for the answer.

      I really should get more familiar with SpEL.

      Comment

      Working...
      X