Reuse JmsTemplate's MessageConverter in JmsMessagingTemplate

This commit makes sure that any custom MessageConverter set in a
JmsTemplate used by a JmsMessagingTemplate is reused as the payload
converter of the message.

Issue: SPR-15965

(cherry picked from commit b275a06)
This commit is contained in:
Stephane Nicoll
2017-09-18 14:27:47 +02:00
committed by Juergen Hoeller
parent 5e904ddcaa
commit 35af7ff854
4 changed files with 231 additions and 178 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -78,7 +78,7 @@ public abstract class AbstractMessageSendingTemplate<D> implements MessageSendin
* @param messageConverter the message converter to use
*/
public void setMessageConverter(MessageConverter messageConverter) {
Assert.notNull(messageConverter, "'messageConverter' must not be null");
Assert.notNull(messageConverter, "MessageConverter must not be null");
this.converter = messageConverter;
}