walking98 commented on issue #6: Rationalise use of ObjectMapper URL: https://github.com/apache/rocketmq-spring/pull/6#issuecomment-447716369 I can see a cycle dependency error with the PR: >>>>>>>> The dependencies of some of the beans in the application context form a cycle: org.springframework.rocketmq.spring.starter.internalRocketMQTransAnnotationProcessor defined in class path resource [org/apache/rocketmq/spring/config/RocketMQAutoConfiguration.class] ↓ transactionHandlerRegistry defined in class path resource [org/apache/rocketmq/spring/config/RocketMQAutoConfiguration.class] ┌─────┐ | rocketMQTemplate defined in class path resource [org/apache/rocketmq/spring/config/RocketMQAutoConfiguration.class] ↑ ↓ | producerApplication └─────┘ >>>>> The reproduce steps: 1. mvn clean install (stage the change) 2. add the following bean injection code in rocketmq-spring-boot-samples/rocketmq-produce-demo/src/main/java/org/apache/rocketmq/samples/springboot/ProducerApplication.java @Bean public ObjectMapper objectMapper() { return new ObjectMapper(); } 3. mvn clean package (under rocketmq-spring-boot-samples) 4. java -jar rocketmq-produce-demo/target/rocketmq-produce-demo-0.0.1-SNAPSHOT.jar The root reason is that the ObjectMapper bean in RocketMQAutoConfiguration is no longer initiated prior to RocketMQTemplate bean injection. So we still need the @ConditionalOnMissingBean(name = "rocketMQMessageObjectMapper") in rocketMQMessageObjectMapper bean declaration of the RocketMQAutoConfiguration.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
