You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/12/10 12:24:11 UTC

[GitHub] [rocketmq-spring] caimofei removed a comment on issue #55: Can the starter provide support for deserializing generic parameters?

caimofei removed a comment on issue #55: Can the starter provide support for deserializing generic parameters?
URL: https://github.com/apache/rocketmq-spring/issues/55#issuecomment-564008541
 
 
   Recently, I tryied solve this problem.
   1. My Main idea is use org.springframework.messaging.converter.SmartMessageConverter#fromMessage .This interface define a third parameter called "Object conversionHint".
   2. I switch the Definition of DefaultRocketMQListenerContainer#messageType to Type insteadof Class
   3. add a "private  MethodParameter onMessageParameter" member  to DefaultRocketMQListenerContainer and init it to indicate the onMessage parameter when afterPropertiesSet() 
   4.when doCovertMessage. if the messageType instanceof  ParameterizedType, then call fromMessage with the third parameter(methodParameter). The MappingJackson2MessageConverter can use it to deserialization the message.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services