CAMEL-14275: Camel component option with Properties should be configurable in SB
diff --git a/components/camel-jcache/src/main/docs/jcache-component.adoc b/components/camel-jcache/src/main/docs/jcache-component.adoc
index 946876a..af0a5a8 100644
--- a/components/camel-jcache/src/main/docs/jcache-component.adoc
+++ b/components/camel-jcache/src/main/docs/jcache-component.adoc
@@ -112,7 +112,7 @@
 
 
 // component options: START
-The JCache component supports 7 options, which are listed below.
+The JCache component supports 8 options, which are listed below.
 
 
 
@@ -121,7 +121,8 @@
 | Name | Description | Default | Type
 | *cachingProvider* (common) | The fully qualified class name of the javax.cache.spi.CachingProvider |  | String
 | *cacheConfiguration* (common) | A Configuration for the Cache |  | Configuration
-| *cacheConfiguration Properties* (common) | The Properties for the javax.cache.spi.CachingProvider to create the CacheManager |  | Properties
+| *cacheConfiguration Properties* (common) | Properties to configure jcache |  | Map
+| *cacheConfiguration PropertiesRef* (common) | References to an existing Properties or Map to lookup in the registry to use for configuring jcache. |  | String
 | *configurationUri* (common) | An implementation specific URI for the CacheManager |  | String
 | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | boolean
diff --git a/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/JCacheComponent.java b/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/JCacheComponent.java
index 124ef5b..61cd4b7 100644
--- a/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/JCacheComponent.java
+++ b/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/JCacheComponent.java
@@ -26,6 +26,7 @@
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.spi.annotations.Component;
+import org.apache.camel.support.CamelContextHelper;
 import org.apache.camel.support.DefaultComponent;
 
 /**
@@ -36,7 +37,8 @@
 
     private String cachingProvider;
     private Configuration cacheConfiguration;
-    private Properties cacheConfigurationProperties;
+    private String cacheConfigurationPropertiesRef;
+    private Map cacheConfigurationProperties;
     private String configurationUri;
 
     public JCacheComponent() {
@@ -53,13 +55,27 @@
 
         configuration.setCachingProvider(cachingProvider);
         configuration.setCacheConfiguration(cacheConfiguration);
-        configuration.setCacheConfigurationProperties(cacheConfigurationProperties);
+        configuration.setCacheConfigurationProperties(loadProperties());
         configuration.setConfigurationUri(configurationUri);
 
         setProperties(configuration, parameters);
         return new JCacheEndpoint(uri, this, configuration);
     }
 
+    private Properties loadProperties() {
+        Properties answer = null;
+        if (cacheConfigurationProperties != null) {
+            answer = new Properties();
+            answer.putAll(cacheConfigurationProperties);
+        }
+        if (answer == null && cacheConfigurationPropertiesRef != null) {
+            Map map = CamelContextHelper.mandatoryLookup(getCamelContext(), cacheConfigurationPropertiesRef, Map.class);
+            answer = new Properties();
+            answer.putAll(map);
+        }
+        return answer;
+    }
+
     /**
      * The fully qualified class name of the {@link javax.cache.spi.CachingProvider}
      */
@@ -83,17 +99,27 @@
     }
 
     /**
-     * The {@link Properties} for the {@link javax.cache.spi.CachingProvider} to
-     * create the {@link CacheManager}
+     * Properties to configure jcache
      */
-    public Properties getCacheConfigurationProperties() {
+    public Map getCacheConfigurationProperties() {
         return cacheConfigurationProperties;
     }
 
-    public void setCacheConfigurationProperties(Properties cacheConfigurationProperties) {
+    public void setCacheConfigurationProperties(Map cacheConfigurationProperties) {
         this.cacheConfigurationProperties = cacheConfigurationProperties;
     }
 
+    public String getCacheConfigurationPropertiesRef() {
+        return cacheConfigurationPropertiesRef;
+    }
+
+    /**
+     * References to an existing {@link Properties} or {@link Map} to lookup in the registry to use for configuring jcache.
+     */
+    public void setCacheConfigurationPropertiesRef(String cacheConfigurationPropertiesRef) {
+        this.cacheConfigurationPropertiesRef = cacheConfigurationPropertiesRef;
+    }
+
     /**
      * An implementation specific URI for the {@link CacheManager}
      */
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JCacheEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JCacheEndpointBuilderFactory.java
index 757152d..cd691be 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JCacheEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JCacheEndpointBuilderFactory.java
@@ -17,7 +17,7 @@
 package org.apache.camel.builder.endpoint.dsl;
 
 import java.util.List;
-import java.util.Properties;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.builder.EndpointConsumerBuilder;
@@ -74,12 +74,12 @@
          * The Properties for the javax.cache.spi.CachingProvider to create the
          * CacheManager.
          * 
-         * The option is a: <code>java.util.Properties</code> type.
+         * The option is a: <code>java.util.Map</code> type.
          * 
          * Group: common
          */
         default JCacheEndpointConsumerBuilder cacheConfigurationProperties(
-                Properties cacheConfigurationProperties) {
+                Map cacheConfigurationProperties) {
             doSetProperty("cacheConfigurationProperties", cacheConfigurationProperties);
             return this;
         }
@@ -87,8 +87,7 @@
          * The Properties for the javax.cache.spi.CachingProvider to create the
          * CacheManager.
          * 
-         * The option will be converted to a <code>java.util.Properties</code>
-         * type.
+         * The option will be converted to a <code>java.util.Map</code> type.
          * 
          * Group: common
          */
@@ -639,12 +638,12 @@
          * The Properties for the javax.cache.spi.CachingProvider to create the
          * CacheManager.
          * 
-         * The option is a: <code>java.util.Properties</code> type.
+         * The option is a: <code>java.util.Map</code> type.
          * 
          * Group: common
          */
         default JCacheEndpointProducerBuilder cacheConfigurationProperties(
-                Properties cacheConfigurationProperties) {
+                Map cacheConfigurationProperties) {
             doSetProperty("cacheConfigurationProperties", cacheConfigurationProperties);
             return this;
         }
@@ -652,8 +651,7 @@
          * The Properties for the javax.cache.spi.CachingProvider to create the
          * CacheManager.
          * 
-         * The option will be converted to a <code>java.util.Properties</code>
-         * type.
+         * The option will be converted to a <code>java.util.Map</code> type.
          * 
          * Group: common
          */
@@ -1062,12 +1060,12 @@
          * The Properties for the javax.cache.spi.CachingProvider to create the
          * CacheManager.
          * 
-         * The option is a: <code>java.util.Properties</code> type.
+         * The option is a: <code>java.util.Map</code> type.
          * 
          * Group: common
          */
         default JCacheEndpointBuilder cacheConfigurationProperties(
-                Properties cacheConfigurationProperties) {
+                Map cacheConfigurationProperties) {
             doSetProperty("cacheConfigurationProperties", cacheConfigurationProperties);
             return this;
         }
@@ -1075,8 +1073,7 @@
          * The Properties for the javax.cache.spi.CachingProvider to create the
          * CacheManager.
          * 
-         * The option will be converted to a <code>java.util.Properties</code>
-         * type.
+         * The option will be converted to a <code>java.util.Map</code> type.
          * 
          * Group: common
          */
diff --git a/platforms/spring-boot/components-starter/camel-jcache-starter/src/main/java/org/apache/camel/component/jcache/springboot/JCacheComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-jcache-starter/src/main/java/org/apache/camel/component/jcache/springboot/JCacheComponentConfiguration.java
index 51d281c..a8d3c53 100644
--- a/platforms/spring-boot/components-starter/camel-jcache-starter/src/main/java/org/apache/camel/component/jcache/springboot/JCacheComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-jcache-starter/src/main/java/org/apache/camel/component/jcache/springboot/JCacheComponentConfiguration.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.jcache.springboot;
 
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -47,10 +48,14 @@
      */
     private String cacheConfiguration;
     /**
-     * The Properties for the javax.cache.spi.CachingProvider to create the
-     * CacheManager. The option is a java.util.Properties type.
+     * Properties to configure jcache
      */
-    private String cacheConfigurationProperties;
+    private Map cacheConfigurationProperties;
+    /**
+     * References to an existing Properties or Map to lookup in the registry to
+     * use for configuring jcache.
+     */
+    private String cacheConfigurationPropertiesRef;
     /**
      * An implementation specific URI for the CacheManager
      */
@@ -97,15 +102,23 @@
         this.cacheConfiguration = cacheConfiguration;
     }
 
-    public String getCacheConfigurationProperties() {
+    public Map getCacheConfigurationProperties() {
         return cacheConfigurationProperties;
     }
 
-    public void setCacheConfigurationProperties(
-            String cacheConfigurationProperties) {
+    public void setCacheConfigurationProperties(Map cacheConfigurationProperties) {
         this.cacheConfigurationProperties = cacheConfigurationProperties;
     }
 
+    public String getCacheConfigurationPropertiesRef() {
+        return cacheConfigurationPropertiesRef;
+    }
+
+    public void setCacheConfigurationPropertiesRef(
+            String cacheConfigurationPropertiesRef) {
+        this.cacheConfigurationPropertiesRef = cacheConfigurationPropertiesRef;
+    }
+
     public String getConfigurationUri() {
         return configurationUri;
     }