In my spring boot application, I am setting up two different instances of MQQueueConnectionFactory (different identifier), as it is needed for the application. For this, I added ibm customer banks.
I also added spring -jms dependency in my code, as I need JmsTemplate classes, etc. After adding this dependency, JmsAutoConfiguration finds the JmsTemplate in the class path and tries to configure beans. In this process, he tries to inject a bean of type ConnectionFactory, and this is where the code does not work, and I start getting an error. Below is the code from JmsAutoConfiguration
@Configuration @ConditionalOnClass(JmsTemplate.class) @ConditionalOnBean(ConnectionFactory.class) @EnableConfigurationProperties(JmsProperties.class) @Import(JmsAnnotationDrivenConfiguration.class) public class JmsAutoConfiguration { @Autowired private JmsProperties properties; @Autowired private ConnectionFactory connectionFactory; @Autowired(required = false) private DestinationResolver destinationResolver;
Do I have the option to disable the spring boot JmsAutoconfiguration function, if possible? If not, what is the alternative solution for this?
source share