This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push: new c84f36e5f42 CAMEL-22141: camel-main: Fix duplicate route id detect when you load multiple routes on startup (such as via camel-jbang) c84f36e5f42 is described below commit c84f36e5f421966b4ce90659845ef085ef181a46 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Thu Jun 5 16:37:35 2025 +0200 CAMEL-22141: camel-main: Fix duplicate route id detect when you load multiple routes on startup (such as via camel-jbang) --- .../apache/camel/spring/boot/CamelSpringBootApplicationListener.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelSpringBootApplicationListener.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelSpringBootApplicationListener.java index 32e39a34b66..549dfcc379b 100644 --- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelSpringBootApplicationListener.java +++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelSpringBootApplicationListener.java @@ -89,9 +89,10 @@ public class CamelSpringBootApplicationListener implements ApplicationListener<C if (event.getApplicationContext() == this.applicationContext && camelContext.getStatus().isStopped()) { LOG.debug("Post-processing CamelContext bean: {}", camelContext.getName()); + RoutesConfigurer configurer = new RoutesConfigurer(camelContext); try { // we can use the default routes configurer - RoutesConfigurer configurer = new RoutesConfigurer(); + ServiceHelper.startService(configurer); if (configurationProperties.getMain().isRoutesCollectorEnabled()) { configurer.setRoutesCollector(springBootRoutesCollector); @@ -227,6 +228,8 @@ public class CamelSpringBootApplicationListener implements ApplicationListener<C } } catch (Exception e) { throw new CamelSpringBootInitializationException(e); + } finally { + ServiceHelper.stopService(configurer); } } else { LOG.debug("Camel already started, not adding routes.");