This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot-examples.git
The following commit(s) were added to refs/heads/main by this push:
new 925356b Excluding AMQ autoconfiguration in Spring Boot so that
camel-activemq… (#93)
925356b is described below
commit 925356be0c02cc84817a1410a7168ce34d6339a9
Author: Torsten Mielke <[email protected]>
AuthorDate: Fri Sep 30 10:49:49 2022 +0200
Excluding AMQ autoconfiguration in Spring Boot so that camel-activemq… (#93)
* Excluding AMQ autoconfiguration in Spring Boot so that camel-activemq
configuration settings get used
* commenting spring boot option spring.activemq.broker-ur as it is no
longer needed
---
.../main/java/sample/camel/SampleAmqApplication.java | 4 ++++
activemq/src/main/resources/application.properties | 20 ++++++++++++--------
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/activemq/src/main/java/sample/camel/SampleAmqApplication.java
b/activemq/src/main/java/sample/camel/SampleAmqApplication.java
index 6890811..5b60e79 100644
--- a/activemq/src/main/java/sample/camel/SampleAmqApplication.java
+++ b/activemq/src/main/java/sample/camel/SampleAmqApplication.java
@@ -17,9 +17,13 @@
package sample.camel;
import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import
org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration;
+
//CHECKSTYLE:OFF
+@EnableAutoConfiguration(exclude = {ActiveMQAutoConfiguration.class})
@SpringBootApplication
public class SampleAmqApplication {
diff --git a/activemq/src/main/resources/application.properties
b/activemq/src/main/resources/application.properties
index a27e1d0..3b35db8 100644
--- a/activemq/src/main/resources/application.properties
+++ b/activemq/src/main/resources/application.properties
@@ -18,13 +18,17 @@
# to keep the JVM running
camel.springboot.main-run-controller = true
-# setup camel-activemq-starter with the url of the remote broker
-# you can change the port number to 61617 and reconfigure conf/activemq.xml to
use port 61617 instead of 61616
-# to try using a different port than the default
-# because spring boot comes with activemq support out of the box when it
detects activemq JARs
-# then you need to configure the broker-url in spring-boot
-# the configuration on camel.component.activemq.broker-url is not really in
use but is recommended
-# to be configured so camel-activemq has the same setting
-spring.activemq.broker-url=tcp://localhost:61616
+# Setup camel-activemq-starter with the url of the remote broker.
+# You can change the port number to 61617 and reconfigure conf/activemq.xml to
use port 61617 instead of 61616
+# to try using a different port than the default.
+# Because spring boot comes with activemq support out of the box when it
detects activemq JARs
+# then you need to configure the broker-url in spring-boot.
+# Unless the application is configured for
+# @EnableAutoConfiguration(exclude = {
+# ActiveMQAutoConfiguration.class
+# })
+# the configuration on camel.component.activemq.broker-url is not really in
use.
+# But is recommended to be configured so camel-activemq has the same setting
+# spring.activemq.broker-url=tcp://localhost:61616
camel.component.activemq.broker-url=tcp://localhost:61616