This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 94782452fac Make Camel SPI beans looked up by type unremovable
94782452fac is described below
commit 94782452fac46810ec2a7c5a3cdbd9fdf2de7f1c
Author: James Netherton <[email protected]>
AuthorDate: Mon Nov 30 16:57:35 2026 +0000
Make Camel SPI beans looked up by type unremovable
Camel resolves several SPI types from the registry by type rather than by
injection, so ArC removed CDI beans implementing them and they silently
had no effect. Add these to the bean types that CamelBeansProcessor marks
as unremovable:
- ComponentCustomizer, DataFormatCustomizer, LanguageCustomizer and their
Policy filters
- StartupCondition
- RouteTemplateParameterSource
- OnCamelContextEvent, covering all OnCamelContext* lifecycle callbacks
Add a deployment test, plus JVM and native coverage in the foundation core
integration tests.
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
.../core/deployment/CamelBeansProcessor.java | 29 ++-
.../deployment/CamelSpiBeansUnremovableTest.java | 215 +++++++++++++++++++++
integration-test-groups/foundation/core/pom.xml | 17 ++
.../org/apache/camel/quarkus/core/SpiBeans.java | 118 +++++++++++
.../org/apache/camel/quarkus/core/SpiResource.java | 107 ++++++++++
.../org/apache/camel/quarkus/core/SpiRoutes.java | 29 +++
.../org/apache/camel/quarkus/core/SpiBeansIT.java | 23 +++
.../apache/camel/quarkus/core/SpiBeansTest.java | 60 ++++++
8 files changed, 597 insertions(+), 1 deletion(-)
diff --git
a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelBeansProcessor.java
b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelBeansProcessor.java
index 18ca65a8b18..d8b9616b15a 100644
---
a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelBeansProcessor.java
+++
b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelBeansProcessor.java
@@ -72,6 +72,24 @@ class CamelBeansProcessor {
"org.apache.camel.Predicate");
private static final DotName SIMPLE_FUNCTION_TYPE = DotName.createSimple(
"org.apache.camel.spi.SimpleFunction");
+ private static final DotName COMPONENT_CUSTOMIZER_TYPE =
DotName.createSimple(
+ "org.apache.camel.spi.ComponentCustomizer");
+ private static final DotName COMPONENT_CUSTOMIZER_POLICY_TYPE =
DotName.createSimple(
+ "org.apache.camel.spi.ComponentCustomizer$Policy");
+ private static final DotName DATA_FORMAT_CUSTOMIZER_TYPE =
DotName.createSimple(
+ "org.apache.camel.spi.DataFormatCustomizer");
+ private static final DotName DATA_FORMAT_CUSTOMIZER_POLICY_TYPE =
DotName.createSimple(
+ "org.apache.camel.spi.DataFormatCustomizer$Policy");
+ private static final DotName LANGUAGE_CUSTOMIZER_TYPE =
DotName.createSimple(
+ "org.apache.camel.spi.LanguageCustomizer");
+ private static final DotName LANGUAGE_CUSTOMIZER_POLICY_TYPE =
DotName.createSimple(
+ "org.apache.camel.spi.LanguageCustomizer$Policy");
+ private static final DotName STARTUP_CONDITION_TYPE = DotName.createSimple(
+ "org.apache.camel.spi.StartupCondition");
+ private static final DotName ROUTE_TEMPLATE_PARAMETER_SOURCE_TYPE =
DotName.createSimple(
+ "org.apache.camel.spi.RouteTemplateParameterSource");
+ private static final DotName ON_CAMEL_CONTEXT_EVENT_TYPE =
DotName.createSimple(
+ "org.apache.camel.spi.OnCamelContextEvent");
private static final Set<DotName> UNREMOVABLE_BEANS_TYPES =
CamelSupport.setOf(
ROUTES_BUILDER_TYPE,
@@ -82,7 +100,16 @@ class CamelBeansProcessor {
COMPONENT_TYPE,
PRODUCER_TYPE,
PREDICATE_TYPE,
- SIMPLE_FUNCTION_TYPE);
+ SIMPLE_FUNCTION_TYPE,
+ COMPONENT_CUSTOMIZER_TYPE,
+ COMPONENT_CUSTOMIZER_POLICY_TYPE,
+ DATA_FORMAT_CUSTOMIZER_TYPE,
+ DATA_FORMAT_CUSTOMIZER_POLICY_TYPE,
+ LANGUAGE_CUSTOMIZER_TYPE,
+ LANGUAGE_CUSTOMIZER_POLICY_TYPE,
+ STARTUP_CONDITION_TYPE,
+ ROUTE_TEMPLATE_PARAMETER_SOURCE_TYPE,
+ ON_CAMEL_CONTEXT_EVENT_TYPE);
private static final DotName[] CATALOG_SCHEMA_TYPES = {
DotName.createSimple(Component.class.getName()),
diff --git
a/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelSpiBeansUnremovableTest.java
b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelSpiBeansUnremovableTest.java
new file mode 100644
index 00000000000..33a7aef7b9f
--- /dev/null
+++
b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelSpiBeansUnremovableTest.java
@@ -0,0 +1,215 @@
+/*
+ * 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.quarkus.core.deployment;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import io.quarkus.test.QuarkusExtensionTest;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.direct.DirectComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
+import org.apache.camel.spi.Language;
+import org.apache.camel.spi.LanguageCustomizer;
+import org.apache.camel.spi.OnCamelContextInitialized;
+import org.apache.camel.spi.OnCamelContextInitializing;
+import org.apache.camel.spi.OnCamelContextStarted;
+import org.apache.camel.spi.OnCamelContextStarting;
+import org.apache.camel.spi.OnCamelContextStopped;
+import org.apache.camel.spi.OnCamelContextStopping;
+import org.apache.camel.spi.RouteTemplateParameterSource;
+import org.apache.camel.spi.StartupCondition;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class CamelSpiBeansUnremovableTest {
+ static final AtomicBoolean STARTED = new AtomicBoolean();
+
+ @RegisterExtension
+ static final QuarkusExtensionTest CONFIG = new QuarkusExtensionTest()
+ .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
+ .addClasses(
+ DirectTimeoutCustomizer.class,
+ AllComponentsPolicy.class,
+ NoOpDataFormatCustomizer.class,
+ AllDataFormatsPolicy.class,
+ NoOpLanguageCustomizer.class,
+ AllLanguagesPolicy.class,
+ AlwaysStartupCondition.class,
+ GreetingTemplateParameterSource.class,
+ GreetingTemplateRoutes.class,
+ ContextLifecycleListener.class));
+
+ @Inject
+ CamelContext context;
+
+ @Test
+ void spiBeansAreVisibleInRegistry() {
+
assertThat(context.getRegistry().findByType(ComponentCustomizer.class)).hasSize(1);
+
assertThat(context.getRegistry().findByType(ComponentCustomizer.Policy.class)).hasSize(1);
+
assertThat(context.getRegistry().findByType(DataFormatCustomizer.class)).hasSize(1);
+
assertThat(context.getRegistry().findByType(DataFormatCustomizer.Policy.class)).hasSize(1);
+
assertThat(context.getRegistry().findByType(LanguageCustomizer.class)).hasSize(1);
+
assertThat(context.getRegistry().findByType(LanguageCustomizer.Policy.class)).hasSize(1);
+
assertThat(context.getRegistry().findByType(StartupCondition.class)).hasSize(1);
+
assertThat(context.getRegistry().findByType(RouteTemplateParameterSource.class)).hasSize(1);
+
assertThat(context.getRegistry().findByType(OnCamelContextInitializing.class)).hasSize(1);
+
assertThat(context.getRegistry().findByType(OnCamelContextInitialized.class)).hasSize(1);
+
assertThat(context.getRegistry().findByType(OnCamelContextStarting.class)).hasSize(1);
+
assertThat(context.getRegistry().findByType(OnCamelContextStarted.class)).hasSize(1);
+
assertThat(context.getRegistry().findByType(OnCamelContextStopping.class)).hasSize(1);
+
assertThat(context.getRegistry().findByType(OnCamelContextStopped.class)).hasSize(1);
+ }
+
+ @Test
+ void componentCustomizerIsApplied() {
+ assertThat(context.getComponent("direct",
DirectComponent.class).getTimeout()).isEqualTo(1234);
+ }
+
+ @Test
+ void routeTemplateParameterSourceCreatesRoute() {
+ assertThat(context.getRoute("greeting-route")).isNotNull();
+ }
+
+ @Test
+ void onCamelContextEventIsFired() {
+ assertThat(STARTED).isTrue();
+ }
+
+ @ApplicationScoped
+ public static class DirectTimeoutCustomizer implements ComponentCustomizer
{
+ @Override
+ public boolean isEnabled(String name, Component target) {
+ return target instanceof DirectComponent;
+ }
+
+ @Override
+ public void configure(String name, Component target) {
+ ((DirectComponent) target).setTimeout(1234);
+ }
+ }
+
+ @ApplicationScoped
+ public static class AllComponentsPolicy implements
ComponentCustomizer.Policy {
+ @Override
+ public boolean test(String name, Component target) {
+ return true;
+ }
+ }
+
+ @ApplicationScoped
+ public static class NoOpDataFormatCustomizer implements
DataFormatCustomizer {
+ @Override
+ public void configure(String name, DataFormat target) {
+ }
+ }
+
+ @ApplicationScoped
+ public static class AllDataFormatsPolicy implements
DataFormatCustomizer.Policy {
+ @Override
+ public boolean test(String name, DataFormat target) {
+ return true;
+ }
+ }
+
+ @ApplicationScoped
+ public static class NoOpLanguageCustomizer implements LanguageCustomizer {
+ @Override
+ public void configure(String name, Language target) {
+ }
+ }
+
+ @ApplicationScoped
+ public static class AllLanguagesPolicy implements
LanguageCustomizer.Policy {
+ @Override
+ public boolean test(String name, Language target) {
+ return true;
+ }
+ }
+
+ @ApplicationScoped
+ public static class AlwaysStartupCondition implements StartupCondition {
+ @Override
+ public boolean canContinue(CamelContext camelContext) {
+ return true;
+ }
+ }
+
+ @ApplicationScoped
+ public static class GreetingTemplateParameterSource implements
RouteTemplateParameterSource {
+ @Override
+ public Map<String, Object> parameters(String routeId) {
+ return Map.of(TEMPLATE_ID, "greeting-template", "name",
"greeting");
+ }
+
+ @Override
+ public Set<String> routeIds() {
+ return Set.of("greeting-route");
+ }
+ }
+
+ @ApplicationScoped
+ public static class GreetingTemplateRoutes extends RouteBuilder {
+ @Override
+ public void configure() {
+ routeTemplate("greeting-template")
+ .templateParameter("name")
+ .from("direct:{{name}}")
+ .setBody().constant("Hello");
+ }
+ }
+
+ @ApplicationScoped
+ public static class ContextLifecycleListener implements
OnCamelContextInitializing, OnCamelContextInitialized,
+ OnCamelContextStarting, OnCamelContextStarted,
OnCamelContextStopping, OnCamelContextStopped {
+ @Override
+ public void onContextInitializing(CamelContext context) {
+ }
+
+ @Override
+ public void onContextInitialized(CamelContext context) {
+ }
+
+ @Override
+ public void onContextStarting(CamelContext context) {
+ }
+
+ @Override
+ public void onContextStarted(CamelContext context) {
+ STARTED.set(true);
+ }
+
+ @Override
+ public void onContextStopping(CamelContext context) {
+ }
+
+ @Override
+ public void onContextStopped(CamelContext context) {
+ }
+ }
+}
diff --git a/integration-test-groups/foundation/core/pom.xml
b/integration-test-groups/foundation/core/pom.xml
index d0dcbde8e70..302a263bc4d 100644
--- a/integration-test-groups/foundation/core/pom.xml
+++ b/integration-test-groups/foundation/core/pom.xml
@@ -35,6 +35,10 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-direct</artifactId>
+ </dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
@@ -112,6 +116,19 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-direct-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
</profile>
</profiles>
diff --git
a/integration-test-groups/foundation/core/src/main/java/org/apache/camel/quarkus/core/SpiBeans.java
b/integration-test-groups/foundation/core/src/main/java/org/apache/camel/quarkus/core/SpiBeans.java
new file mode 100644
index 00000000000..ef047bc8ef4
--- /dev/null
+++
b/integration-test-groups/foundation/core/src/main/java/org/apache/camel/quarkus/core/SpiBeans.java
@@ -0,0 +1,118 @@
+/*
+ * 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.quarkus.core;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.component.direct.DirectComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
+import org.apache.camel.spi.Language;
+import org.apache.camel.spi.LanguageCustomizer;
+import org.apache.camel.spi.OnCamelContextInitialized;
+import org.apache.camel.spi.OnCamelContextStarted;
+import org.apache.camel.spi.RouteTemplateParameterSource;
+import org.apache.camel.spi.StartupCondition;
+
+/**
+ * Camel SPI implementations that Camel looks up from the registry by type.
Nothing injects them, so they must survive
+ * ArC unused bean removal on their own. Each one is scoped to names used only
by this test, so that it does not affect
+ * other modules in the grouped application.
+ */
+public class SpiBeans {
+ public static final String CUSTOMIZED_COMPONENT_NAME =
"spi-customized-direct";
+ public static final long CUSTOMIZED_TIMEOUT = 1234;
+ static final List<String> CONTEXT_EVENTS = new CopyOnWriteArrayList<>();
+
+ @ApplicationScoped
+ public static class SpiComponentCustomizer implements ComponentCustomizer {
+ @Override
+ public boolean isEnabled(String name, Component target) {
+ return CUSTOMIZED_COMPONENT_NAME.equals(name);
+ }
+
+ @Override
+ public void configure(String name, Component target) {
+ ((DirectComponent) target).setTimeout(CUSTOMIZED_TIMEOUT);
+ }
+ }
+
+ @ApplicationScoped
+ public static class SpiDataFormatCustomizer implements
DataFormatCustomizer {
+ @Override
+ public boolean isEnabled(String name, DataFormat target) {
+ return false;
+ }
+
+ @Override
+ public void configure(String name, DataFormat target) {
+ }
+ }
+
+ @ApplicationScoped
+ public static class SpiLanguageCustomizer implements LanguageCustomizer {
+ @Override
+ public boolean isEnabled(String name, Language target) {
+ return false;
+ }
+
+ @Override
+ public void configure(String name, Language target) {
+ }
+ }
+
+ @ApplicationScoped
+ public static class SpiStartupCondition implements StartupCondition {
+ @Override
+ public boolean canContinue(CamelContext camelContext) {
+ return true;
+ }
+ }
+
+ @ApplicationScoped
+ public static class SpiRouteTemplateParameterSource implements
RouteTemplateParameterSource {
+ @Override
+ public Map<String, Object> parameters(String routeId) {
+ return Map.of(TEMPLATE_ID, "spi-greeting-template", "greeting",
"Hello from route template");
+ }
+
+ @Override
+ public Set<String> routeIds() {
+ return Set.of("spi-greeting-route");
+ }
+ }
+
+ @ApplicationScoped
+ public static class SpiContextEventListener implements
OnCamelContextInitialized, OnCamelContextStarted {
+ @Override
+ public void onContextInitialized(CamelContext context) {
+ CONTEXT_EVENTS.add("initialized");
+ }
+
+ @Override
+ public void onContextStarted(CamelContext context) {
+ CONTEXT_EVENTS.add("started");
+ }
+ }
+}
diff --git
a/integration-test-groups/foundation/core/src/main/java/org/apache/camel/quarkus/core/SpiResource.java
b/integration-test-groups/foundation/core/src/main/java/org/apache/camel/quarkus/core/SpiResource.java
new file mode 100644
index 00000000000..a6abb46ed59
--- /dev/null
+++
b/integration-test-groups/foundation/core/src/main/java/org/apache/camel/quarkus/core/SpiResource.java
@@ -0,0 +1,107 @@
+/*
+ * 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.quarkus.core;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import jakarta.inject.Inject;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import org.apache.camel.CamelContext;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.direct.DirectComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spi.DataFormatCustomizer;
+import org.apache.camel.spi.LanguageCustomizer;
+import org.apache.camel.spi.OnCamelContextInitialized;
+import org.apache.camel.spi.OnCamelContextStarted;
+import org.apache.camel.spi.Registry;
+import org.apache.camel.spi.RouteTemplateParameterSource;
+import org.apache.camel.spi.StartupCondition;
+
+/**
+ * Inspects the SPI beans only through Camel, as injecting them here would
stop ArC from removing them.
+ */
+@Path("/core/spi")
+public class SpiResource {
+
+ @Inject
+ CamelContext context;
+
+ @Inject
+ ProducerTemplate template;
+
+ @Path("/registered")
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ public String registered() {
+ Registry registry = context.getRegistry();
+ List<String> found = new ArrayList<>();
+ addIfFound(found, "ComponentCustomizer",
registry.findByType(ComponentCustomizer.class),
+ SpiBeans.SpiComponentCustomizer.class);
+ addIfFound(found, "DataFormatCustomizer",
registry.findByType(DataFormatCustomizer.class),
+ SpiBeans.SpiDataFormatCustomizer.class);
+ addIfFound(found, "LanguageCustomizer",
registry.findByType(LanguageCustomizer.class),
+ SpiBeans.SpiLanguageCustomizer.class);
+ addIfFound(found, "StartupCondition",
registry.findByType(StartupCondition.class),
+ SpiBeans.SpiStartupCondition.class);
+ addIfFound(found, "RouteTemplateParameterSource",
registry.findByType(RouteTemplateParameterSource.class),
+ SpiBeans.SpiRouteTemplateParameterSource.class);
+ addIfFound(found, "OnCamelContextInitialized",
registry.findByType(OnCamelContextInitialized.class),
+ SpiBeans.SpiContextEventListener.class);
+ addIfFound(found, "OnCamelContextStarted",
registry.findByType(OnCamelContextStarted.class),
+ SpiBeans.SpiContextEventListener.class);
+ return String.join(",", found);
+ }
+
+ @Path("/component/timeout")
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ public long componentTimeout() {
+ DirectComponent component = new DirectComponent();
+ context.addComponent(SpiBeans.CUSTOMIZED_COMPONENT_NAME, component);
+ try {
+ return component.getTimeout();
+ } finally {
+ context.removeComponent(SpiBeans.CUSTOMIZED_COMPONENT_NAME);
+ }
+ }
+
+ @Path("/route-template")
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ public String routeTemplate() {
+ return template.requestBody("direct:spiGreeting", null, String.class);
+ }
+
+ @Path("/context-events")
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ public String contextEvents() {
+ return String.join(",", SpiBeans.CONTEXT_EVENTS);
+ }
+
+ private static void addIfFound(List<String> found, String name, Set<?>
beans, Class<?> expectedType) {
+ if (beans.stream().anyMatch(expectedType::isInstance)) {
+ found.add(name);
+ }
+ }
+}
diff --git
a/integration-test-groups/foundation/core/src/main/java/org/apache/camel/quarkus/core/SpiRoutes.java
b/integration-test-groups/foundation/core/src/main/java/org/apache/camel/quarkus/core/SpiRoutes.java
new file mode 100644
index 00000000000..d4939233527
--- /dev/null
+++
b/integration-test-groups/foundation/core/src/main/java/org/apache/camel/quarkus/core/SpiRoutes.java
@@ -0,0 +1,29 @@
+/*
+ * 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.quarkus.core;
+
+import org.apache.camel.builder.RouteBuilder;
+
+public class SpiRoutes extends RouteBuilder {
+ @Override
+ public void configure() {
+ routeTemplate("spi-greeting-template")
+ .templateParameter("greeting")
+ .from("direct:spiGreeting")
+ .setBody().constant("{{greeting}}");
+ }
+}
diff --git
a/integration-test-groups/foundation/core/src/test/java/org/apache/camel/quarkus/core/SpiBeansIT.java
b/integration-test-groups/foundation/core/src/test/java/org/apache/camel/quarkus/core/SpiBeansIT.java
new file mode 100644
index 00000000000..9c647a0b038
--- /dev/null
+++
b/integration-test-groups/foundation/core/src/test/java/org/apache/camel/quarkus/core/SpiBeansIT.java
@@ -0,0 +1,23 @@
+/*
+ * 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.quarkus.core;
+
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+
+@QuarkusIntegrationTest
+public class SpiBeansIT extends SpiBeansTest {
+}
diff --git
a/integration-test-groups/foundation/core/src/test/java/org/apache/camel/quarkus/core/SpiBeansTest.java
b/integration-test-groups/foundation/core/src/test/java/org/apache/camel/quarkus/core/SpiBeansTest.java
new file mode 100644
index 00000000000..b118eccb760
--- /dev/null
+++
b/integration-test-groups/foundation/core/src/test/java/org/apache/camel/quarkus/core/SpiBeansTest.java
@@ -0,0 +1,60 @@
+/*
+ * 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.quarkus.core;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.Matchers.equalTo;
+
+@QuarkusTest
+public class SpiBeansTest {
+
+ @Test
+ public void spiBeansAreRegistered() {
+ RestAssured.get("/core/spi/registered")
+ .then()
+ .statusCode(200)
+
.body(equalTo("ComponentCustomizer,DataFormatCustomizer,LanguageCustomizer,StartupCondition,"
+ +
"RouteTemplateParameterSource,OnCamelContextInitialized,OnCamelContextStarted"));
+ }
+
+ @Test
+ public void componentCustomizerIsApplied() {
+ RestAssured.get("/core/spi/component/timeout")
+ .then()
+ .statusCode(200)
+ .body(equalTo("1234"));
+ }
+
+ @Test
+ public void routeTemplateParameterSourceCreatesRoute() {
+ RestAssured.get("/core/spi/route-template")
+ .then()
+ .statusCode(200)
+ .body(equalTo("Hello from route template"));
+ }
+
+ @Test
+ public void camelContextEventsAreFired() {
+ RestAssured.get("/core/spi/context-events")
+ .then()
+ .statusCode(200)
+ .body(equalTo("initialized,started"));
+ }
+}