-
Notifications
You must be signed in to change notification settings - Fork 38.5k
JsonView support for JMS [SPR-13237] #17828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Juergen Hoeller commented We don't necessarily need to bake Stéphane, let's find out where we're at with this. There might just be very little missing in order to make this work with JMS properly. Juergen |
Stéphane Nicoll commented We still have time to add support of |
doom777 commented I realize that there isn't enough time to push this into 4.2 GA, however this is still important functionality, and the workaround is currently ugly. If you already implemented functionality to use custom views on MessageMappings and MessageSubscriptionMappins, then you should also have it on jmsTemplate.convertAndSend, since it's also a first-class pathway into sending messages to the client. At the very least make MappingJackson2MessageConverter.convertToInternal protected, so I can overwrite it and send my JsonView in the headers, kind of like you are already doing with MessageMappings |
Stéphane Nicoll commented "would be nice" does not sound like important functionality to me :-) But granted, I'll have a look at that use case to see if we can improve the experience on the sending part as well. |
Juergen Hoeller commented I'm moving this to the backlog since support for Juergen |
doom777 commented The way it is now is almost there. Now I can do The only problem is that the main MessageConverter is the delegating CompositeMessageConverter, which does not support public final Message<?> toMessage(Object payload, MessageHeaders headers, Object conversionHint). |
Juergen Hoeller commented Good point. I've created #17927 for that purpose, introducing a Juergen |
Juergen Hoeller commented This Juergen |
Stéphane Nicoll commented This has been merged to master and should be available in a couple of hours. I have created a sample project that showcases what you can do with it. Sending a message with a given JSonView is as straightforward as invoking the converter with the JSonView to use from a Please give that a try and let me know if there is any issue. Thanks! |
Uh oh!
There was an error while loading. Please reload this page.
doom777 opened SPR-13237 and commented
Just like MappingJackson2HttpMessageConverter now supports JsonView, so too should MappingJackson2MessageConverter.
Also would be nice to set JsonView, or just a Class in JmsTemplate.convertAndSend
Issue Links:
@JsonView
deserialization support for@MessageMapping
payloads@JsonView
@JsonView
deserialization support for request bodies@JsonView
on@MessageMapping
methods@MessageMapping
should support generically typed Message argument with converted payloadReferenced from: commits faab220, dc8de51
1 votes, 9 watchers
The text was updated successfully, but these errors were encountered: