This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch CAMEL-23112-sb in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
commit ef09ef82fe2c73db5491901189515cb9bfbc26e1 Author: Andrea Cosentino <[email protected]> AuthorDate: Wed Mar 4 11:48:21 2026 +0100 CAMEL-23112 - Drop JDK 17 Support Signed-off-by: Andrea Cosentino <[email protected]> --- .github/workflows/automatic-sync-main.yml | 2 +- .github/workflows/generate-sbom-main.yml | 2 +- .github/workflows/pr-build-main.yml | 2 +- .../src/main/resources/archetype-resources/pom.xml | 2 +- .../springboot/catalog/components/docling.json | 4 +- .../src/main/docs/docling.json | 2 +- .../springboot/DoclingComponentConfiguration.java | 7 ++- ...ingBootPlatformHttpCamelVirtualThreadsTest.java | 3 -- ...ormHttpMultipleExecutorsVirtualThreadsTest.java | 3 -- ...ootPlatformHttpVirtualThreadsOptimizedTest.java | 3 -- .../SpringBootPlatformHttpVirtualThreadsTest.java | 3 -- core/camel-spring-boot/pom.xml | 57 +++++----------------- ...CamelVirtualThreadEnvironmentPostProcessor.java | 16 ++---- .../camel/spring/boot/CamelVirtualThreadsTest.java | 0 pom.xml | 7 ++- 15 files changed, 29 insertions(+), 84 deletions(-) diff --git a/.github/workflows/automatic-sync-main.yml b/.github/workflows/automatic-sync-main.yml index 595e3e04c68..abad8d1ca7b 100644 --- a/.github/workflows/automatic-sync-main.yml +++ b/.github/workflows/automatic-sync-main.yml @@ -38,7 +38,7 @@ jobs: uses: actions/setup-java@v5 with: distribution: 'temurin' - java-version: 17 + java-version: 21 cache: 'maven' - name: Build Camel Project run: ./mvnw -V --no-transfer-progress -Dquickly clean install diff --git a/.github/workflows/generate-sbom-main.yml b/.github/workflows/generate-sbom-main.yml index de553ee6302..dfdc779336c 100644 --- a/.github/workflows/generate-sbom-main.yml +++ b/.github/workflows/generate-sbom-main.yml @@ -40,7 +40,7 @@ jobs: uses: actions/setup-java@v5 with: distribution: 'temurin' - java-version: 17 + java-version: 21 cache: 'maven' - name: Build Camel Project run: ./mvnw -B -V --no-transfer-progress -Dquickly install diff --git a/.github/workflows/pr-build-main.yml b/.github/workflows/pr-build-main.yml index 73db087b5b9..d3af89aabc5 100644 --- a/.github/workflows/pr-build-main.yml +++ b/.github/workflows/pr-build-main.yml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: ['17'] + java: ['21'] steps: - uses: actions/checkout@v6 with: diff --git a/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/pom.xml b/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/pom.xml index 173de86ddf0..31988712cdd 100644 --- a/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/pom.xml @@ -97,7 +97,7 @@ <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin-version}</version> <configuration> - <release>11</release> + <release>21</release> </configuration> </plugin> <plugin> diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/docling.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/docling.json index 149929a80db..15a0cac1ec3 100644 --- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/docling.json +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/docling.json @@ -61,7 +61,7 @@ "workingDirectory": { "index": 34, "kind": "property", "displayName": "Working Directory", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Working directory for Docling execution" }, "batchFailOnFirstError": { "index": 35, "kind": "property", "displayName": "Batch Fail On First Error", "group": "batch", "label": "batch", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Fail entire batch on first error (true) or conti [...] "batchParallelism": { "index": 36, "kind": "property", "displayName": "Batch Parallelism", "group": "batch", "label": "batch", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 4, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Number of parallel threads for batch processing" }, - "batchSize": { "index": 37, "kind": "property", "displayName": "Batch Size", "group": "batch", "label": "batch", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 10, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Maximum number of documents to process in a single batch (batch operations only)" }, + "batchSize": { "index": 37, "kind": "property", "displayName": "Batch Size", "group": "batch", "label": "batch", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 10, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Number of documents to submit per sub-batch. Documents are partitioned into sub-b [...] "batchTimeout": { "index": 38, "kind": "property", "displayName": "Batch Timeout", "group": "batch", "label": "batch", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 300000, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Maximum time to wait for batch completion in milliseconds" }, "splitBatchResults": { "index": 39, "kind": "property", "displayName": "Split Batch Results", "group": "batch", "label": "batch", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Split batch results into individual exchanges (one per do [...] "chunkingIncludeRawText": { "index": 40, "kind": "property", "displayName": "Chunking Include Raw Text", "group": "chunking", "label": "chunking", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Include raw text in chunk output" }, @@ -147,7 +147,7 @@ "workingDirectory": { "index": 33, "kind": "parameter", "displayName": "Working Directory", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Working directory for Docling execution" }, "batchFailOnFirstError": { "index": 34, "kind": "parameter", "displayName": "Batch Fail On First Error", "group": "batch", "label": "batch", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Fail entire batch on first error (true) or cont [...] "batchParallelism": { "index": 35, "kind": "parameter", "displayName": "Batch Parallelism", "group": "batch", "label": "batch", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 4, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Number of parallel threads for batch processing" }, - "batchSize": { "index": 36, "kind": "parameter", "displayName": "Batch Size", "group": "batch", "label": "batch", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 10, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Maximum number of documents to process in a single batch (batch operations only)" }, + "batchSize": { "index": 36, "kind": "parameter", "displayName": "Batch Size", "group": "batch", "label": "batch", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 10, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Number of documents to submit per sub-batch. Documents are partitioned into sub- [...] "batchTimeout": { "index": 37, "kind": "parameter", "displayName": "Batch Timeout", "group": "batch", "label": "batch", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 300000, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Maximum time to wait for batch completion in milliseconds" }, "splitBatchResults": { "index": 38, "kind": "parameter", "displayName": "Split Batch Results", "group": "batch", "label": "batch", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Split batch results into individual exchanges (one per d [...] "chunkingIncludeRawText": { "index": 39, "kind": "parameter", "displayName": "Chunking Include Raw Text", "group": "chunking", "label": "chunking", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.docling.DoclingConfiguration", "configurationField": "configuration", "description": "Include raw text in chunk output" }, diff --git a/components-starter/camel-docling-starter/src/main/docs/docling.json b/components-starter/camel-docling-starter/src/main/docs/docling.json index 1eeb24a40d5..f9951b67840 100644 --- a/components-starter/camel-docling-starter/src/main/docs/docling.json +++ b/components-starter/camel-docling-starter/src/main/docs/docling.json @@ -78,7 +78,7 @@ { "name": "camel.component.docling.batch-size", "type": "java.lang.Integer", - "description": "Maximum number of documents to process in a single batch (batch operations only)", + "description": "Number of documents to submit per sub-batch. Documents are partitioned into sub-batches of this size and each sub-batch is processed before starting the next one. Within each sub-batch, up to batchParallelism threads are used concurrently. This controls memory usage and back-pressure when processing large document sets.", "sourceType": "org.apache.camel.component.docling.springboot.DoclingComponentConfiguration", "defaultValue": 10 }, diff --git a/components-starter/camel-docling-starter/src/main/java/org/apache/camel/component/docling/springboot/DoclingComponentConfiguration.java b/components-starter/camel-docling-starter/src/main/java/org/apache/camel/component/docling/springboot/DoclingComponentConfiguration.java index 8c313d5a33a..74ada5ed4fa 100644 --- a/components-starter/camel-docling-starter/src/main/java/org/apache/camel/component/docling/springboot/DoclingComponentConfiguration.java +++ b/components-starter/camel-docling-starter/src/main/java/org/apache/camel/component/docling/springboot/DoclingComponentConfiguration.java @@ -203,8 +203,11 @@ public class DoclingComponentConfiguration */ private Integer batchParallelism = 4; /** - * Maximum number of documents to process in a single batch (batch - * operations only) + * Number of documents to submit per sub-batch. Documents are partitioned + * into sub-batches of this size and each sub-batch is processed before + * starting the next one. Within each sub-batch, up to batchParallelism + * threads are used concurrently. This controls memory usage and + * back-pressure when processing large document sets. */ private Integer batchSize = 10; /** diff --git a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpCamelVirtualThreadsTest.java b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpCamelVirtualThreadsTest.java index 039271d09f6..44835a2fc0f 100644 --- a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpCamelVirtualThreadsTest.java +++ b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpCamelVirtualThreadsTest.java @@ -20,8 +20,6 @@ import org.apache.camel.builder.RouteBuilder; import org.apache.camel.spring.boot.CamelAutoConfiguration; import org.apache.camel.test.spring.junit6.CamelSpringBootTest; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnJre; -import org.junit.jupiter.api.condition.JRE; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.Bean; @@ -37,7 +35,6 @@ import static org.assertj.core.api.Assertions.assertThat; SpringBootPlatformHttpCamelVirtualThreadsTest.class, SpringBootPlatformHttpCamelVirtualThreadsTest.TestConfiguration.class, PlatformHttpComponentAutoConfiguration.class, SpringBootPlatformHttpAutoConfiguration.class }, properties = "spring.threads.virtual.enabled=true") -@DisabledOnJre({JRE.JAVA_17, JRE.JAVA_18, JRE.JAVA_19, JRE.JAVA_20}) public class SpringBootPlatformHttpCamelVirtualThreadsTest extends PlatformHttpBase { private static final String postRouteId = "SpringBootPlatformHttpCamelVirtualThreadsTest_mypost"; diff --git a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpMultipleExecutorsVirtualThreadsTest.java b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpMultipleExecutorsVirtualThreadsTest.java index 2b2b130c595..8c6f345aa1b 100644 --- a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpMultipleExecutorsVirtualThreadsTest.java +++ b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpMultipleExecutorsVirtualThreadsTest.java @@ -21,8 +21,6 @@ import org.apache.camel.spring.boot.CamelAutoConfiguration; import org.apache.camel.test.spring.junit6.CamelSpringBootTest; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnJre; -import org.junit.jupiter.api.condition.JRE; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; @@ -48,7 +46,6 @@ import java.util.concurrent.Executor; PlatformHttpComponentAutoConfiguration.class, SpringBootPlatformHttpAutoConfiguration.class }, properties = "spring.threads.virtual.enabled=true") @EnableScheduling -@DisabledOnJre({JRE.JAVA_17, JRE.JAVA_18, JRE.JAVA_19, JRE.JAVA_20}) @AutoConfigureRestTestClient public class SpringBootPlatformHttpMultipleExecutorsVirtualThreadsTest extends PlatformHttpBase { diff --git a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpVirtualThreadsOptimizedTest.java b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpVirtualThreadsOptimizedTest.java index cdab352d373..ce3f3f09399 100644 --- a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpVirtualThreadsOptimizedTest.java +++ b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpVirtualThreadsOptimizedTest.java @@ -20,8 +20,6 @@ import org.apache.camel.builder.RouteBuilder; import org.apache.camel.spring.boot.CamelAutoConfiguration; import org.apache.camel.test.spring.junit6.CamelSpringBootTest; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnJre; -import org.junit.jupiter.api.condition.JRE; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; @@ -42,7 +40,6 @@ import static org.assertj.core.api.Assertions.assertThat; SpringBootPlatformHttpVirtualThreadsOptimizedTest.class, SpringBootPlatformHttpVirtualThreadsOptimizedTest.TestConfiguration.class, PlatformHttpComponentAutoConfiguration.class, SpringBootPlatformHttpAutoConfiguration.class }, properties = "spring.threads.virtual.enabled=true") -@DisabledOnJre({JRE.JAVA_17, JRE.JAVA_18, JRE.JAVA_19, JRE.JAVA_20}) public class SpringBootPlatformHttpVirtualThreadsOptimizedTest extends PlatformHttpBase { private static final String postRouteId = "SpringBootPlatformHttpVirtualThreadsOptimizedTest_mypost"; diff --git a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpVirtualThreadsTest.java b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpVirtualThreadsTest.java index c60a131c039..ca4d64af0e2 100644 --- a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpVirtualThreadsTest.java +++ b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpVirtualThreadsTest.java @@ -19,8 +19,6 @@ package org.apache.camel.component.platform.http.springboot; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.spring.boot.CamelAutoConfiguration; import org.apache.camel.test.spring.junit6.CamelSpringBootTest; -import org.junit.jupiter.api.condition.DisabledOnJre; -import org.junit.jupiter.api.condition.JRE; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.Bean; @@ -34,7 +32,6 @@ import org.springframework.security.web.SecurityFilterChain; SpringBootPlatformHttpVirtualThreadsTest.class, SpringBootPlatformHttpVirtualThreadsTest.TestConfiguration.class, PlatformHttpComponentAutoConfiguration.class, SpringBootPlatformHttpAutoConfiguration.class }, properties = "spring.threads.virtual.enabled=true") -@DisabledOnJre({JRE.JAVA_17, JRE.JAVA_18, JRE.JAVA_19, JRE.JAVA_20}) public class SpringBootPlatformHttpVirtualThreadsTest extends PlatformHttpBase { private static final String postRouteId = "SpringBootPlatformHttpTest_mypost"; diff --git a/core/camel-spring-boot/pom.xml b/core/camel-spring-boot/pom.xml index 6385444cc58..09d6a8cc636 100644 --- a/core/camel-spring-boot/pom.xml +++ b/core/camel-spring-boot/pom.xml @@ -269,53 +269,18 @@ </execution> </executions> </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>${maven-surefire-plugin-version}</version> + <configuration> + <systemPropertyVariables> + <spring.threads.virtual.enabled>true</spring.threads.virtual.enabled> + </systemPropertyVariables> + </configuration> + </plugin> </plugins> </build> - <profiles> - <!-- Profile for JDK 21+ features like Virtual Threads --> - <profile> - <id>jdk21</id> - <activation> - <jdk>[21,)</jdk> - </activation> - <build> - <plugins> - <!-- Configure compiler for JDK 21 compatibility in this profile --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>${maven-compiler-plugin-version}</version> - <executions> - <execution> - <id>testCompile-java-21</id> - <phase>test-compile</phase> - <goals> - <goal>testCompile</goal> - </goals> - <configuration> - <release>21</release> - <compileSourceRoots>${project.basedir}/src/test/java21</compileSourceRoots> - </configuration> - </execution> - </executions> - </plugin> - - <!-- Configure surefire to run JDK 21 specific tests --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${maven-surefire-plugin-version}</version> - <configuration> - <!-- Enable Spring virtual threads - the CamelVirtualThreadEnvironmentPostProcessor - will automatically set camel.threads.virtual.enabled=true --> - <systemPropertyVariables> - <spring.threads.virtual.enabled>true</spring.threads.virtual.enabled> - </systemPropertyVariables> - </configuration> - </plugin> - </plugins> - </build> - </profile> - </profiles> </project> diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelVirtualThreadEnvironmentPostProcessor.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelVirtualThreadEnvironmentPostProcessor.java index 453583963ee..b6c79459218 100644 --- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelVirtualThreadEnvironmentPostProcessor.java +++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelVirtualThreadEnvironmentPostProcessor.java @@ -23,33 +23,23 @@ import org.springframework.boot.env.EnvironmentPostProcessor; import org.springframework.core.env.ConfigurableEnvironment; /** - * Environment post processor that automatically sets the Camel virtual thread + * Environment post processor that automatically sets the Camel virtual thread * system property when Spring Boot virtual threads are enabled. - * + * * This processor runs very early in the Spring Boot startup process, before - * any Camel classes are loaded, ensuring that Camel's ThreadType static + * any Camel classes are loaded, ensuring that Camel's ThreadType static * initialization picks up the correct virtual thread configuration. */ public class CamelVirtualThreadEnvironmentPostProcessor implements EnvironmentPostProcessor { private static final Logger LOG = LoggerFactory.getLogger(CamelVirtualThreadEnvironmentPostProcessor.class); - private static final int VIRTUAL_THREADS_MIN_JAVA_VERSION = 21; - @Override public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) { // Check if Spring Boot virtual threads are enabled String springVirtualThreads = environment.getProperty("spring.threads.virtual.enabled"); if ("true".equalsIgnoreCase(springVirtualThreads)) { - // Verify we're running on JDK 21+ where virtual threads are available - int javaVersion = Runtime.version().feature(); - if (javaVersion < VIRTUAL_THREADS_MIN_JAVA_VERSION) { - LOG.debug("spring.threads.virtual.enabled=true but running on JDK {} (virtual threads require JDK 21+)", - javaVersion); - return; - } - // Set the Camel virtual threads system property early, before Camel classes are loaded String existingCamelProperty = System.getProperty("camel.threads.virtual.enabled"); diff --git a/core/camel-spring-boot/src/test/java21/org/apache/camel/spring/boot/CamelVirtualThreadsTest.java b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelVirtualThreadsTest.java similarity index 100% rename from core/camel-spring-boot/src/test/java21/org/apache/camel/spring/boot/CamelVirtualThreadsTest.java rename to core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelVirtualThreadsTest.java diff --git a/pom.xml b/pom.xml index b3e88d2a43e..2b1660984ed 100644 --- a/pom.xml +++ b/pom.xml @@ -104,7 +104,7 @@ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <site-repo-url>scpexe://people.apache.org/www/camel.apache.org/maven/</site-repo-url> - <jdk.version>17</jdk.version> + <jdk.version>21</jdk.version> <!-- These two are here only to prevent the versions for the Apache parent pom from leaking--> <maven.compiler.source>${jdk.version}</maven.compiler.source> <maven.compiler.target>${jdk.version}</maven.compiler.target> @@ -178,9 +178,8 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> - <source>17</source> + <source>21</source> <additionalOptions>${javadoc.opts}</additionalOptions> - <!-- disable Javadoc linting for buildung the release with Java 11 --> <doclint>none</doclint> </configuration> </plugin> @@ -677,7 +676,7 @@ <goal>jar</goal> </goals> <configuration> - <source>17</source> + <source>21</source> <doclint>none</doclint> </configuration> </execution>
