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 7edb6a61626 CAMEL-22441: components with supportFileReference should
support resource: prefix
7edb6a61626 is described below
commit 7edb6a61626e4f8c9b8c09d5ecbcf37305e2c8a6
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Sep 24 10:32:23 2025 +0200
CAMEL-22441: components with supportFileReference should support resource:
prefix
---
.../apache/camel/spring/boot/CamelAutoConfiguration.java | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
index bb98be62581..03592509fad 100644
---
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
+++
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
@@ -39,7 +39,6 @@ import org.apache.camel.main.DefaultConfigurationConfigurer;
import org.apache.camel.main.MainListener;
import org.apache.camel.main.RoutesCollector;
import org.apache.camel.model.Model;
-import org.apache.camel.spi.BacklogDebugger;
import org.apache.camel.spi.BeanRepository;
import org.apache.camel.spi.CliConnector;
import org.apache.camel.spi.CliConnectorFactory;
@@ -53,7 +52,6 @@ import org.apache.camel.spring.boot.aot.CamelRuntimeHints;
import org.apache.camel.spring.spi.ApplicationContextBeanRepository;
import org.apache.camel.spring.spi.CamelBeanPostProcessor;
import org.apache.camel.support.DefaultRegistry;
-import org.apache.camel.support.LanguageSupport;
import org.apache.camel.support.ResetableClock;
import org.apache.camel.support.ResourceHelper;
import org.apache.camel.support.service.ServiceHelper;
@@ -191,13 +189,10 @@ public class CamelAutoConfiguration {
VariableRepository repo =
camelContext.getCamelContextExtension()
.getContextPlugin(VariableRepositoryFactory.class).getVariableRepository(id);
// it may be a resource to load from disk then
- if (value.startsWith(LanguageSupport.RESOURCE)) {
- value = value.substring(9);
- if (ResourceHelper.hasScheme(value)) {
- InputStream is =
ResourceHelper.resolveMandatoryResourceAsInputStream(camelContext, value);
- value = IOHelper.loadText(is);
- IOHelper.close(is);
- }
+ if (ResourceHelper.hasScheme(value)) {
+ InputStream is =
ResourceHelper.resolveMandatoryResourceAsInputStream(camelContext, value);
+ value = IOHelper.loadText(is);
+ IOHelper.close(is);
}
repo.setVariable(key, value);
}