Disabling Spring JMS Auto configuration in Spring Boot Application

前端 未结 4 1536
旧时难觅i
旧时难觅i 2020-12-16 12:49

In my spring boot application i configure two different instances of MQQueueConnectionFactory (different id) as it is a need of the application. For that i have added ibm cl

相关标签:
4条回答
  • 2020-12-16 13:28

    if want to control it via the properties (in this case a application.yml) then you can do something like this.

    spring:
      autoconfigure:
        exclude: org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration
    
    0 讨论(0)
  • 2020-12-16 13:40

    You can add the auto configurations, which you want to disable, to the SpringBootApplication annotation:

    @SpringBootApplication(exclude = JmsAutoConfiguration.class)
    
    0 讨论(0)
  • 2020-12-16 13:40

    FYI, use this to disable ActiveMQ

    @SpringBootApplication(exclude = ActiveMQAutoConfiguration.class)
    
    0 讨论(0)
  • 2020-12-16 13:54

    In my case it worked after excluding both classes :

     @EnableAutoConfiguration(exclude={JmsAutoConfiguration.class, ActiveMQAutoConfiguration.class})
    
    0 讨论(0)
提交回复
热议问题