diff --git a/spring-integration-core/src/main/java/org/springframework/integration/message/GenericMessage.java b/spring-integration-core/src/main/java/org/springframework/integration/message/GenericMessage.java index aeb7825095..959087256d 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/message/GenericMessage.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/message/GenericMessage.java @@ -64,6 +64,15 @@ public class GenericMessage implements Message { this.payload = payload; } + /** + * Create a new message with the given payload. The id will be generated by + * the default {@link IdGenerator} strategy. The header will be populated + * with the attributes and properties of the provided header. + * + * @param payload the message payload + * @param headerToCopy message header whose attributes and properties should + * be copied into the new message's header + */ public GenericMessage(T payload, MessageHeader headerToCopy) { this(payload); this.copyHeader(headerToCopy);