Last active
January 5, 2022 20:54
-
-
Save rbaul/5bd7ab202c170d1213b7622b7d538215 to your computer and use it in GitHub Desktop.
Configure default Rabbit Listener container with Jackson converter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RabbitListenerConfiguration { | |
@Autowired | |
public void rabbitListenerContainerFactory( | |
@Qualifier(RabbitListenerAnnotationBeanPostProcessor.DEFAULT_RABBIT_LISTENER_CONTAINER_FACTORY_BEAN_NAME) SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory, | |
ObjectMapper objectMapper) { | |
rabbitListenerContainerFactory.setMessageConverter(new Jackson2JsonMessageConverter(objectMapper)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment