You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/12/31 01:02:29 UTC

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1505: 怎么自定义Jackson的ObjectMapper?

liubao68 commented on issue #1505: 怎么自定义Jackson的ObjectMapper?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1505#issuecomment-569840277
 
 
   你需要使用RestObjectMapperFactory setConsumerWriterMapper 和 setDefaultRestObjectMapper覆盖AbstractRestObjectMapper,需要先自定义一个实现。 
   
   通常,不推荐自定义,这个会导致不同的系统之间相互协作出现问题,或者在a -> b -> c等场景下,容易出现错误。 仅仅在需要兼容的情况下,做适当的处理,否则建议改善接口设计,遵循标准行为是推荐的方式。 
   

----------------------------------------------------------------
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