INT-1673 added SpEL documentation for @Header, updated @Header javadocs
This commit is contained in:
@@ -250,6 +250,13 @@ public class FooService {
|
||||
}
|
||||
|
||||
}</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
<note>
|
||||
The value of the annotation can also be a SpEL expression (e.g., 'payload.getCustomerId()') which is quite useful when
|
||||
the name of the header has to be dynamically computed. It also provides an optional 'required' property which
|
||||
specifies whether the attribute value must be available within the header. The default value for 'required' is <code>true</code>.
|
||||
</note>
|
||||
</para>
|
||||
<para>
|
||||
For several of these annotations, when a Message-handling method returns a non-null value, the endpoint will
|
||||
|
||||
@@ -25,7 +25,10 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* Annotation indicating that a method parameter's value should be
|
||||
* retrieved from the message headers. The value of the annotation
|
||||
* provides the header name, and the optional 'required' property
|
||||
* can either be a header name (e.g., 'foo') or SpEL expression
|
||||
* (e.g., 'payload.getCustomerId()') which is quite useful when
|
||||
* the name of the header has to be dynamically computed. It also
|
||||
* provides an optional 'required' property which
|
||||
* specifies whether the attribute value must be available within
|
||||
* the header. The default value for 'required' is <code>true</code>.
|
||||
*
|
||||
|
||||
@@ -18,14 +18,9 @@ package org.springframework.integration.xmpp.config;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import org.jivesoftware.smack.Chat;
|
||||
import org.jivesoftware.smack.ChatManager;
|
||||
import org.jivesoftware.smack.MessageListener;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
Reference in New Issue
Block a user