O'Reilly logo

Learning Spring Boot by Greg L. Turnquist

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Overriding Boot with alternate beans or properties

This section assumes that you have reverted your build file back to using activemq-broker and removed spring.activemq.inMemory=false, hence going back to the in-memory embedded ActiveMQ broker.

In the previous section, we saw how Spring Boot inserts its opinion when it sees spring-jms on the path. It distinctly creates JmsTemplate. But , what if we don't like its opinion?

The jmsTemplate method inside JmsAutoConfiguration was flagged with @ConditionalOnMissingBean. This means that if we create our own bean definition for JmsTemplate, Spring Boot will back off and instead let us plug in our own bean.

JMS supports two types of message destinations: queues and topics. By default, JmsTemplate is configured ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required