Support of @JsonView on @JmsListener annotated method that uses the
jackson converter. Also update MappingJackson2MessageConverter to offer
a public API to set the JSON view to use to serialize a payload.
Issue: SPR-13237
@ -269,14 +270,17 @@ public abstract class AbstractAdaptableMessageListener
@@ -269,14 +270,17 @@ public abstract class AbstractAdaptableMessageListener
@ -425,12 +440,17 @@ public abstract class AbstractAdaptableMessageListener
@@ -425,12 +440,17 @@ public abstract class AbstractAdaptableMessageListener
@ -72,6 +75,17 @@ public class MessagingMessageListenerAdapter extends AbstractAdaptableMessageLis
@@ -72,6 +75,17 @@ public class MessagingMessageListenerAdapter extends AbstractAdaptableMessageLis
@ -189,6 +193,33 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl
@@ -189,6 +193,33 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl
@ -200,6 +231,28 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl
@@ -200,6 +231,28 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl
thrownewMessageConversionException("Could not map JSON object ["+object+"]",ex);
}
setTypeIdOnMessage(object,message);
returnmessage;
}
/**
*Mapthegivenobjecttoa{@linkTextMessage}.
@ -210,12 +263,31 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl
@@ -210,12 +263,31 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl
@ -228,13 +300,33 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl
@@ -228,13 +300,33 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl
@ -256,10 +348,31 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl
@@ -256,10 +348,31 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl
thrownewIllegalArgumentException("Unsupported message type ["+targetType+
"]. MappingJackson2MessageConverter by default only supports TextMessages and BytesMessages.");
}
@ -391,4 +504,42 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl
@@ -391,4 +504,42 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl
@ -92,8 +93,11 @@ public class MessagingMessageConverter implements MessageConverter, Initializing
@@ -92,8 +93,11 @@ public class MessagingMessageConverter implements MessageConverter, Initializing
Message.class.getName()+"] is handled by this converter");
@ -116,11 +120,26 @@ public class MessagingMessageConverter implements MessageConverter, Initializing
@@ -116,11 +120,26 @@ public class MessagingMessageConverter implements MessageConverter, Initializing