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 2018/12/16 06:33:38 UTC

[GitHub] k631583871 commented on a change in pull request #4: Can't start when there already exists a ObjectMapper bean

k631583871 commented on a change in pull request #4: Can't start when there already exists a ObjectMapper bean
URL: https://github.com/apache/rocketmq-spring/pull/4#discussion_r241969447
 
 

 ##########
 File path: rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/config/RocketMQAutoConfiguration.java
 ##########
 @@ -66,7 +66,7 @@ public DefaultMQProducer defaultMQProducer(RocketMQProperties rocketMQProperties
 
     @Bean
     @ConditionalOnClass(name = "com.fasterxml.jackson.databind.ObjectMapper")
-    @ConditionalOnMissingBean(ObjectMapper.class)
+    @ConditionalOnMissingBean(name = "rocketMQMessageObjectMapper")
 
 Review comment:
   > I didn't get the context of the PR but I essentially [asked a similar question](https://github.com/apache/rocketmq-spring/pull/3#issuecomment-446640788).
   > 
   > Why are you creating an `ObjectMapper` at all? Wouldn't it be better to reuse the one that Spring Boot auto-configures?
   
   我没有自己创建 ObjectMapper ,我引入了其他的架包,其中有一个架包就创建了 ObjectMapper 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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