This is an automated email from the ASF dual-hosted git repository.

Croway 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 b9656467016 CAMEL-26590: camel-spring-boot - Upgrade to Spring Boot 
4.2.0
b9656467016 is described below

commit b96564670164fe7a6f08360e94f168ac696269ab
Author: croway <[email protected]>
AuthorDate: Thu Nov 19 20:28:33 2026 +0100

    CAMEL-26590: camel-spring-boot - Upgrade to Spring Boot 4.2.0
    
    Spring Boot 4.2 moved the RabbitMQ auto-configuration from spring-boot-amqp
    to spring-boot-rabbitmq; spring-boot-starter-amqp now brings the AMQP 1.0
    client and no RabbitMQ ConnectionFactory. camel-spring-rabbitmq-starter
    depends on spring-boot-rabbitmq so the component gets the auto-configured
    ConnectionFactory and AmqpAdmin.
    
    Tests: SpringRabbitMQConnectionFactoryAutowireTest checks the component uses
    Boot's beans; SpringRabbitMQBootConnectionFactoryIT routes a message through
    RabbitMQ configured only with spring.rabbitmq.* properties.
    
    json-path: Spring Boot 4.2 manages json-path 3.0.0, so the temporary pin in
    camel-spring-boot-dependencies (CAMEL-22857) and the "JSONPath and Spring
    Boot 4.1" section of the Jackson page are removed.
    
    Regenerated:
    - camel-spring-boot-dependencies: micrometer 1.18.0, micrometer-tracing
      1.8.0; json-path no longer listed
    - spring-boot.json: the configuration processor now keeps the endpoint group
      for management.endpoint.camelroutes; properties are unchanged
    
    Requires the Camel change of CAMEL-26590 (camel-dependencies with
    spring-boot-version 4.2.0).
---
 .../camel-spring-rabbitmq-starter/pom.xml          | 122 +++++++++++++++++++++
 .../SpringRabbitMQBootConnectionFactoryIT.java     |  90 +++++++++++++++
 ...pringRabbitMQConnectionFactoryAutowireTest.java |  63 +++++++++++
 .../src/main/docs/spring-boot.json                 |   4 +-
 docs/spring-boot/modules/ROOT/pages/jackson.adoc   |  30 -----
 .../pom.xml                                        |   9 --
 tooling/camel-spring-boot-dependencies/pom.xml     |  19 ++--
 7 files changed, 284 insertions(+), 53 deletions(-)

diff --git a/components-starter/camel-spring-rabbitmq-starter/pom.xml 
b/components-starter/camel-spring-rabbitmq-starter/pom.xml
index 526db7960b6..e3553e24b95 100644
--- a/components-starter/camel-spring-rabbitmq-starter/pom.xml
+++ b/components-starter/camel-spring-rabbitmq-starter/pom.xml
@@ -33,6 +33,13 @@
       <artifactId>spring-boot-starter</artifactId>
       <version>${spring-boot-version}</version>
     </dependency>
+    <!-- auto-configures the RabbitMQ ConnectionFactory / AmqpAdmin the 
component autowires
+         (moved from spring-boot-amqp to spring-boot-rabbitmq in Spring Boot 
4.2) -->
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-rabbitmq</artifactId>
+      <version>${spring-boot-version}</version>
+    </dependency>
     <dependency>
       <groupId>org.apache.camel</groupId>
       <artifactId>camel-spring-rabbitmq</artifactId>
@@ -46,6 +53,24 @@
       </exclusions>
       <!--END OF GENERATED CODE-->
     </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-test-spring-junit6</artifactId>
+      <version>${camel-version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-test-infra-rabbitmq</artifactId>
+      <version>${camel-version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-test</artifactId>
+      <version>${spring-boot-version}</version>
+      <scope>test</scope>
+    </dependency>
     <!--START OF GENERATED CODE-->
     <dependency>
       <groupId>org.apache.camel.springboot</groupId>
@@ -53,4 +78,101 @@
     </dependency>
     <!--END OF GENERATED CODE-->
   </dependencies>
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+          <configuration>
+            <reuseForks>true</reuseForks>
+            <forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
+            <redirectTestOutputToFile>false</redirectTestOutputToFile>
+            <systemPropertyVariables>
+              <visibleassertions.silence>true</visibleassertions.silence>
+              <ci.env.name>${ci.env.name}</ci.env.name>
+            </systemPropertyVariables>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+  <profiles>
+    <!-- activate integration test if the docker socket file is accessible -->
+    <profile>
+      <id>rabbitmq-integration-tests-docker-file</id>
+      <activation>
+        <file>
+          <exists>/var/run/docker.sock</exists>
+        </file>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-failsafe-plugin</artifactId>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>integration-test</goal>
+                  <goal>verify</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <!-- activate integration test if the DOCKER_HOST env var is set -->
+    <profile>
+      <id>rabbitmq-integration-tests-docker-env</id>
+      <activation>
+        <property>
+          <name>env.DOCKER_HOST</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-failsafe-plugin</artifactId>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>integration-test</goal>
+                  <goal>verify</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <!-- activate integration test on Apache CI (Jenkins daily) -->
+    <profile>
+      <id>rabbitmq-integration-tests-ci</id>
+      <activation>
+        <property>
+          <name>ci.env.name</name>
+          <value>apache.org</value>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-failsafe-plugin</artifactId>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>integration-test</goal>
+                  <goal>verify</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>
diff --git 
a/components-starter/camel-spring-rabbitmq-starter/src/test/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQBootConnectionFactoryIT.java
 
b/components-starter/camel-spring-rabbitmq-starter/src/test/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQBootConnectionFactoryIT.java
new file mode 100644
index 00000000000..5a3ade54049
--- /dev/null
+++ 
b/components-starter/camel-spring-rabbitmq-starter/src/test/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQBootConnectionFactoryIT.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.springrabbit.springboot;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.infra.rabbitmq.services.RabbitMQService;
+import org.apache.camel.test.infra.rabbitmq.services.RabbitMQServiceFactory;
+import org.apache.camel.test.spring.junit6.CamelSpringBootTest;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.context.DynamicPropertyRegistry;
+import org.springframework.test.context.DynamicPropertySource;
+
+/**
+ * Routes a message through RabbitMQ using only the {@code spring.rabbitmq.*} 
properties, i.e. the connection factory
+ * auto-configured by Spring Boot.
+ */
+@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS)
+@CamelSpringBootTest
+@SpringBootTest(classes = 
SpringRabbitMQBootConnectionFactoryIT.TestConfiguration.class)
+@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com",
+                          disabledReason = "Disabled on GH Action due to 
Docker limit")
+class SpringRabbitMQBootConnectionFactoryIT {
+
+    @RegisterExtension
+    static RabbitMQService service = 
RabbitMQServiceFactory.createSingletonService();
+
+    @Autowired
+    ProducerTemplate template;
+
+    @EndpointInject("mock:result")
+    MockEndpoint mock;
+
+    @DynamicPropertySource
+    static void rabbitProperties(DynamicPropertyRegistry registry) {
+        registry.add("spring.rabbitmq.host", service::hostname);
+        registry.add("spring.rabbitmq.port", service::port);
+        registry.add("spring.rabbitmq.username", service::username);
+        registry.add("spring.rabbitmq.password", service::password);
+    }
+
+    @Test
+    void sendAndReceive() throws Exception {
+        mock.expectedBodiesReceived("Hello Spring Boot 4.2");
+
+        template.sendBody("direct:start", "Hello Spring Boot 4.2");
+
+        mock.assertIsSatisfied();
+    }
+
+    @Configuration
+    @EnableAutoConfiguration
+    static class TestConfiguration {
+
+        @Bean
+        RouteBuilder routes() {
+            return new RouteBuilder() {
+                @Override
+                public void configure() {
+                    
from("direct:start").to("spring-rabbitmq:boot42?routingKey=boot42");
+                    
from("spring-rabbitmq:boot42?queues=boot42&routingKey=boot42&autoDeclare=true").to("mock:result");
+                }
+            };
+        }
+    }
+}
diff --git 
a/components-starter/camel-spring-rabbitmq-starter/src/test/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQConnectionFactoryAutowireTest.java
 
b/components-starter/camel-spring-rabbitmq-starter/src/test/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQConnectionFactoryAutowireTest.java
new file mode 100644
index 00000000000..7c201354048
--- /dev/null
+++ 
b/components-starter/camel-spring-rabbitmq-starter/src/test/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQConnectionFactoryAutowireTest.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.springrabbit.springboot;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.springrabbit.SpringRabbitMQComponent;
+import org.apache.camel.test.spring.junit6.CamelSpringBootTest;
+import org.junit.jupiter.api.Test;
+import org.springframework.amqp.core.AmqpAdmin;
+import org.springframework.amqp.rabbit.connection.ConnectionFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.test.annotation.DirtiesContext;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * The starter alone (no {@code spring-boot-starter-rabbitmq}) must give the 
component the {@link ConnectionFactory}
+ * and {@link AmqpAdmin} that Spring Boot auto-configures. No broker is 
needed: the connection factory connects lazily.
+ */
+@DirtiesContext
+@CamelSpringBootTest
+@SpringBootTest(classes = 
SpringRabbitMQConnectionFactoryAutowireTest.TestConfiguration.class)
+class SpringRabbitMQConnectionFactoryAutowireTest {
+
+    @Autowired
+    CamelContext context;
+
+    @Autowired
+    ConnectionFactory connectionFactory;
+
+    @Autowired
+    AmqpAdmin amqpAdmin;
+
+    @Test
+    void componentUsesBootConnectionFactory() {
+        SpringRabbitMQComponent component = 
context.getComponent("spring-rabbitmq", SpringRabbitMQComponent.class);
+
+        
assertThat(component.getConnectionFactory()).isSameAs(connectionFactory);
+        assertThat(component.getAmqpAdmin()).isSameAs(amqpAdmin);
+    }
+
+    @Configuration
+    @EnableAutoConfiguration
+    static class TestConfiguration {
+    }
+}
diff --git a/core/camel-spring-boot/src/main/docs/spring-boot.json 
b/core/camel-spring-boot/src/main/docs/spring-boot.json
index ec2f3b1d9bb..56f08a5caba 100644
--- a/core/camel-spring-boot/src/main/docs/spring-boot.json
+++ b/core/camel-spring-boot/src/main/docs/spring-boot.json
@@ -156,8 +156,8 @@
     },
     {
       "name": "management.endpoint.camelroutes",
-      "type": 
"org.apache.camel.spring.boot.actuate.endpoint.CamelRoutesEndpointProperties",
-      "sourceType": 
"org.apache.camel.spring.boot.actuate.endpoint.CamelRoutesEndpointProperties"
+      "type": 
"org.apache.camel.spring.boot.actuate.endpoint.CamelRoutesEndpoint",
+      "sourceType": 
"org.apache.camel.spring.boot.actuate.endpoint.CamelRoutesEndpoint"
     },
     {
       "name": "management.server.accesslog",
diff --git a/docs/spring-boot/modules/ROOT/pages/jackson.adoc 
b/docs/spring-boot/modules/ROOT/pages/jackson.adoc
index 460e6dda4a2..21bbf09dc12 100644
--- a/docs/spring-boot/modules/ROOT/pages/jackson.adoc
+++ b/docs/spring-boot/modules/ROOT/pages/jackson.adoc
@@ -254,33 +254,3 @@ mvn dependency:list | grep -E 
'jackson-(databind|annotations)'
 
 If you override them, override both lines together and use matching release 
trains (for example Jackson 2.22.x with
 Jackson 3.2.x), because both lines share 
`com.fasterxml.jackson.core:jackson-annotations`.
-
-== JSONPath and Spring Boot 4.1
-
-The JSONPath language (`camel-jsonpath-starter`) uses Jackson 3 through the 
`Jackson3JsonProvider` and
-`Jackson3MappingProvider` of json-path 3. Spring Boot 4.1 manages json-path 
2.10.0, which does not have them, and the
-Spring Boot version wins over the one Camel brings. An application with a 
route that uses JSONPath then fails to start
-with `NoClassDefFoundError: 
com/jayway/jsonpath/spi/json/Jackson3JsonProvider`. Spring Boot 4.2 manages 
json-path
-3.0.0.
-
-With Spring Boot 4.1, use json-path 3.0.0. When the project inherits from 
`spring-boot-starter-parent`, set the
-property:
-
-[source,xml]
-----
-<properties>
-    <json-path.version>3.0.0</json-path.version>
-</properties>
-----
-
-When the project imports the `spring-boot-dependencies` BOM, add json-path to 
the `dependencyManagement` section of the
-project, which wins over the imported BOMs:
-
-[source,xml]
-----
-<dependency>
-    <groupId>com.jayway.jsonpath</groupId>
-    <artifactId>json-path</artifactId>
-    <version>3.0.0</version>
-</dependency>
-----
diff --git a/tooling/camel-spring-boot-dependencies-generator/pom.xml 
b/tooling/camel-spring-boot-dependencies-generator/pom.xml
index 005c98641e8..cff6263b3b4 100644
--- a/tooling/camel-spring-boot-dependencies-generator/pom.xml
+++ b/tooling/camel-spring-boot-dependencies-generator/pom.xml
@@ -57,15 +57,6 @@
                 <version>${avro-version}</version>
             </dependency>
 
-            <!-- json-path (version from Camel): camel-jsonpath uses the 
Jackson 3 providers of json-path 3,
-                 while Spring Boot 4.1 manages json-path 2.x, which it only 
uses in spring-boot-starter-test.
-                 Remove when upgrading to Spring Boot 4.2, which manages 
json-path 3.0.0. -->
-            <dependency>
-                <groupId>com.jayway.jsonpath</groupId>
-                <artifactId>json-path</artifactId>
-                <version>${json-path-version}</version>
-            </dependency>
-
             <!-- Dependencies from Camel parent at the end -->
             <dependency>
                 <groupId>org.apache.camel</groupId>
diff --git a/tooling/camel-spring-boot-dependencies/pom.xml 
b/tooling/camel-spring-boot-dependencies/pom.xml
index c30874fc149..b481a4676c4 100644
--- a/tooling/camel-spring-boot-dependencies/pom.xml
+++ b/tooling/camel-spring-boot-dependencies/pom.xml
@@ -101,11 +101,6 @@
           </exclusion>
         </exclusions>
       </dependency>
-      <dependency>
-        <groupId>com.jayway.jsonpath</groupId>
-        <artifactId>json-path</artifactId>
-        <version>3.0.0</version>
-      </dependency>
       <dependency>
         <groupId>com.openai</groupId>
         <artifactId>openai-java</artifactId>
@@ -295,37 +290,37 @@
       <dependency>
         <groupId>io.micrometer</groupId>
         <artifactId>micrometer-commons</artifactId>
-        <version>1.17.2</version>
+        <version>1.18.0</version>
       </dependency>
       <dependency>
         <groupId>io.micrometer</groupId>
         <artifactId>micrometer-observation</artifactId>
-        <version>1.17.2</version>
+        <version>1.18.0</version>
       </dependency>
       <dependency>
         <groupId>io.micrometer</groupId>
         <artifactId>micrometer-registry-jmx</artifactId>
-        <version>1.17.2</version>
+        <version>1.18.0</version>
       </dependency>
       <dependency>
         <groupId>io.micrometer</groupId>
         <artifactId>micrometer-registry-prometheus</artifactId>
-        <version>1.17.2</version>
+        <version>1.18.0</version>
       </dependency>
       <dependency>
         <groupId>io.micrometer</groupId>
         <artifactId>micrometer-tracing</artifactId>
-        <version>1.7.2</version>
+        <version>1.8.0</version>
       </dependency>
       <dependency>
         <groupId>io.micrometer</groupId>
         <artifactId>micrometer-tracing-bridge-otel</artifactId>
-        <version>1.7.2</version>
+        <version>1.8.0</version>
       </dependency>
       <dependency>
         <groupId>io.micrometer</groupId>
         <artifactId>micrometer-tracing-test</artifactId>
-        <version>1.7.2</version>
+        <version>1.8.0</version>
       </dependency>
       <dependency>
         <groupId>io.opentelemetry.proto</groupId>

Reply via email to