http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentConfiguration.java b/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentConfiguration.java index e6576aa..237e19c 100644 --- a/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentConfiguration.java +++ b/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentConfiguration.java @@ -17,11 +17,12 @@ package org.apache.camel.component.cache.springboot; import net.sf.ehcache.store.MemoryStoreEvictionPolicy; -import org.apache.camel.component.cache.CacheConfiguration; import org.apache.camel.component.cache.CacheEventListenerRegistry; import org.apache.camel.component.cache.CacheLoaderRegistry; import org.apache.camel.component.cache.CacheManagerFactory; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.DeprecatedConfigurationProperty; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * The cache component enables you to perform caching operations using EHCache @@ -36,71 +37,17 @@ public class CacheComponentConfiguration { * To use the given CacheManagerFactory for creating the CacheManager. By * default the DefaultCacheManagerFactory is used. */ + @NestedConfigurationProperty private CacheManagerFactory cacheManagerFactory; /** - * Sets the Cache configuration. Properties of the shared configuration can - * also be set individually. + * Sets the Cache configuration */ - private CacheConfiguration configuration; + private CacheConfigurationNestedConfiguration configuration; /** * Sets the location of the ehcache.xml file to load from classpath or file * system. By default the file is loaded from classpath:ehcache.xml */ private String configurationFile; - /** - * Name of the cache - */ - private String cacheName; - /** - * The number of elements that may be stored in the defined cache in memory. - */ - private Integer maxElementsInMemory; - /** - * Which eviction strategy to use when maximum number of elements in memory - * is reached. The strategy defines which elements to be removed. LRU - Lest - * Recently Used LFU - Lest Frequently Used FIFO - First In First Out - */ - private MemoryStoreEvictionPolicy memoryStoreEvictionPolicy; - /** - * Specifies whether cache may overflow to disk - */ - private Boolean overflowToDisk; - /** - * Sets whether elements are eternal. If eternal timeouts are ignored and - * the element never expires. - */ - private Boolean eternal; - /** - * The maximum time between creation time and when an element expires. Is - * used only if the element is not eternal - */ - private long timeToLiveSeconds; - /** - * The maximum amount of time between accesses before an element expires - */ - private long timeToIdleSeconds; - /** - * Whether the disk store persists between restarts of the application. - */ - private Boolean diskPersistent; - /** - * The number of seconds between runs of the disk expiry thread. - */ - private long diskExpiryThreadIntervalSeconds; - /** - * To configure event listeners using the CacheEventListenerRegistry - */ - private CacheEventListenerRegistry eventListenerRegistry; - /** - * To configure cache loader using the CacheLoaderRegistry - */ - private CacheLoaderRegistry cacheLoaderRegistry; - /** - * Whether to turn on allowing to store non serializable objects in the - * cache. If this option is enabled then overflow to disk cannot be enabled - * as well. - */ - private Boolean objectCache; public CacheManagerFactory getCacheManagerFactory() { return cacheManagerFactory; @@ -110,11 +57,12 @@ public class CacheComponentConfiguration { this.cacheManagerFactory = cacheManagerFactory; } - public CacheConfiguration getConfiguration() { + public CacheConfigurationNestedConfiguration getConfiguration() { return configuration; } - public void setConfiguration(CacheConfiguration configuration) { + public void setConfiguration( + CacheConfigurationNestedConfiguration configuration) { this.configuration = configuration; } @@ -126,102 +74,186 @@ public class CacheComponentConfiguration { this.configurationFile = configurationFile; } - public String getCacheName() { - return cacheName; - } - - public void setCacheName(String cacheName) { - this.cacheName = cacheName; - } - - public Integer getMaxElementsInMemory() { - return maxElementsInMemory; - } - - public void setMaxElementsInMemory(Integer maxElementsInMemory) { - this.maxElementsInMemory = maxElementsInMemory; - } - - public MemoryStoreEvictionPolicy getMemoryStoreEvictionPolicy() { - return memoryStoreEvictionPolicy; - } - - public void setMemoryStoreEvictionPolicy( - MemoryStoreEvictionPolicy memoryStoreEvictionPolicy) { - this.memoryStoreEvictionPolicy = memoryStoreEvictionPolicy; - } - - public Boolean getOverflowToDisk() { - return overflowToDisk; - } - - public void setOverflowToDisk(Boolean overflowToDisk) { - this.overflowToDisk = overflowToDisk; - } - - public Boolean getEternal() { - return eternal; - } - - public void setEternal(Boolean eternal) { - this.eternal = eternal; - } - - public long getTimeToLiveSeconds() { - return timeToLiveSeconds; - } - - public void setTimeToLiveSeconds(long timeToLiveSeconds) { - this.timeToLiveSeconds = timeToLiveSeconds; - } - - public long getTimeToIdleSeconds() { - return timeToIdleSeconds; - } - - public void setTimeToIdleSeconds(long timeToIdleSeconds) { - this.timeToIdleSeconds = timeToIdleSeconds; - } - - public Boolean getDiskPersistent() { - return diskPersistent; - } - - public void setDiskPersistent(Boolean diskPersistent) { - this.diskPersistent = diskPersistent; - } - - public long getDiskExpiryThreadIntervalSeconds() { - return diskExpiryThreadIntervalSeconds; - } - - public void setDiskExpiryThreadIntervalSeconds( - long diskExpiryThreadIntervalSeconds) { - this.diskExpiryThreadIntervalSeconds = diskExpiryThreadIntervalSeconds; - } - - public CacheEventListenerRegistry getEventListenerRegistry() { - return eventListenerRegistry; - } - - public void setEventListenerRegistry( - CacheEventListenerRegistry eventListenerRegistry) { - this.eventListenerRegistry = eventListenerRegistry; - } - - public CacheLoaderRegistry getCacheLoaderRegistry() { - return cacheLoaderRegistry; - } - - public void setCacheLoaderRegistry(CacheLoaderRegistry cacheLoaderRegistry) { - this.cacheLoaderRegistry = cacheLoaderRegistry; - } - - public Boolean getObjectCache() { - return objectCache; - } - - public void setObjectCache(Boolean objectCache) { - this.objectCache = objectCache; + public static class CacheConfigurationNestedConfiguration { + public static final Class CAMEL_NESTED_CLASS = org.apache.camel.component.cache.CacheConfiguration.class; + /** + * Name of the cache + */ + private String cacheName; + /** + * The number of elements that may be stored in the defined cache in + * memory. + */ + private Integer maxElementsInMemory; + /** + * Which eviction strategy to use when maximum number of elements in + * memory is reached. The strategy defines which elements to be removed. + * <ul> + * <li>LRU - Lest Recently Used</li> + * <li>LFU - Lest Frequently Used</li> + * <li>FIFO - First In First Out</li> + * </ul> + */ + @NestedConfigurationProperty + private MemoryStoreEvictionPolicy memoryStoreEvictionPolicy; + /** + * Specifies whether cache may overflow to disk + */ + private Boolean overflowToDisk; + /** + * This parameter is ignored. CacheManager sets it using setter + * injection. + */ + @Deprecated + private String diskStorePath; + /** + * Sets whether elements are eternal. If eternal, timeouts are ignored + * and the element never expires. + */ + private Boolean eternal; + /** + * The maximum time between creation time and when an element expires. + * Is used only if the element is not eternal + */ + private Long timeToLiveSeconds; + /** + * The maximum amount of time between accesses before an element expires + */ + private Long timeToIdleSeconds; + /** + * Whether the disk store persists between restarts of the application. + */ + private Boolean diskPersistent; + /** + * The number of seconds between runs of the disk expiry thread. + */ + private Long diskExpiryThreadIntervalSeconds; + /** + * To configure event listeners using the CacheEventListenerRegistry + */ + @NestedConfigurationProperty + private CacheEventListenerRegistry eventListenerRegistry; + /** + * To configure cache loader using the CacheLoaderRegistry + */ + @NestedConfigurationProperty + private CacheLoaderRegistry cacheLoaderRegistry; + /** + * Whether to turn on allowing to store non serializable objects in the + * cache. If this option is enabled then overflow to disk cannot be + * enabled as well. + */ + private Boolean objectCache; + + public String getCacheName() { + return cacheName; + } + + public void setCacheName(String cacheName) { + this.cacheName = cacheName; + } + + public Integer getMaxElementsInMemory() { + return maxElementsInMemory; + } + + public void setMaxElementsInMemory(Integer maxElementsInMemory) { + this.maxElementsInMemory = maxElementsInMemory; + } + + public MemoryStoreEvictionPolicy getMemoryStoreEvictionPolicy() { + return memoryStoreEvictionPolicy; + } + + public void setMemoryStoreEvictionPolicy( + MemoryStoreEvictionPolicy memoryStoreEvictionPolicy) { + this.memoryStoreEvictionPolicy = memoryStoreEvictionPolicy; + } + + public Boolean getOverflowToDisk() { + return overflowToDisk; + } + + public void setOverflowToDisk(Boolean overflowToDisk) { + this.overflowToDisk = overflowToDisk; + } + + @Deprecated + @DeprecatedConfigurationProperty + public String getDiskStorePath() { + return diskStorePath; + } + + @Deprecated + public void setDiskStorePath(String diskStorePath) { + this.diskStorePath = diskStorePath; + } + + public Boolean getEternal() { + return eternal; + } + + public void setEternal(Boolean eternal) { + this.eternal = eternal; + } + + public Long getTimeToLiveSeconds() { + return timeToLiveSeconds; + } + + public void setTimeToLiveSeconds(Long timeToLiveSeconds) { + this.timeToLiveSeconds = timeToLiveSeconds; + } + + public Long getTimeToIdleSeconds() { + return timeToIdleSeconds; + } + + public void setTimeToIdleSeconds(Long timeToIdleSeconds) { + this.timeToIdleSeconds = timeToIdleSeconds; + } + + public Boolean getDiskPersistent() { + return diskPersistent; + } + + public void setDiskPersistent(Boolean diskPersistent) { + this.diskPersistent = diskPersistent; + } + + public Long getDiskExpiryThreadIntervalSeconds() { + return diskExpiryThreadIntervalSeconds; + } + + public void setDiskExpiryThreadIntervalSeconds( + Long diskExpiryThreadIntervalSeconds) { + this.diskExpiryThreadIntervalSeconds = diskExpiryThreadIntervalSeconds; + } + + public CacheEventListenerRegistry getEventListenerRegistry() { + return eventListenerRegistry; + } + + public void setEventListenerRegistry( + CacheEventListenerRegistry eventListenerRegistry) { + this.eventListenerRegistry = eventListenerRegistry; + } + + public CacheLoaderRegistry getCacheLoaderRegistry() { + return cacheLoaderRegistry; + } + + public void setCacheLoaderRegistry( + CacheLoaderRegistry cacheLoaderRegistry) { + this.cacheLoaderRegistry = cacheLoaderRegistry; + } + + public Boolean getObjectCache() { + return objectCache; + } + + public void setObjectCache(Boolean objectCache) { + this.objectCache = objectCache; + } } } \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java b/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java index 004fbd7..87080c6 100644 --- a/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java +++ b/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java @@ -44,6 +44,26 @@ public class CometdComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentConfiguration.java b/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentConfiguration.java index b232398..00e5546 100644 --- a/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentConfiguration.java +++ b/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentConfiguration.java @@ -21,6 +21,7 @@ import org.apache.camel.util.jsse.SSLContextParameters; import org.cometd.bayeux.server.BayeuxServer.Extension; import org.cometd.bayeux.server.SecurityPolicy; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * The cometd component is a transport for working with the Jetty implementation @@ -46,6 +47,7 @@ public class CometdComponentConfiguration { /** * To use a custom configured SecurityPolicy to control authorization */ + @NestedConfigurationProperty private SecurityPolicy securityPolicy; /** * To use a list of custom BayeuxServer.Extension that allows modifying @@ -55,6 +57,7 @@ public class CometdComponentConfiguration { /** * To configure security using SSLContextParameters */ + @NestedConfigurationProperty private SSLContextParameters sslContextParameters; public String getSslKeyPassword() { http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java index 2a586d3..75533f5 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java @@ -44,6 +44,26 @@ public class DirectComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentConfiguration.java index 7aff386..5774bac 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentConfiguration.java @@ -36,7 +36,7 @@ public class DirectComponentConfiguration { /** * The timeout value to use if block is enabled. */ - private long timeout = 30000; + private Long timeout = 30000; public Boolean getBlock() { return block; @@ -46,11 +46,11 @@ public class DirectComponentConfiguration { this.block = block; } - public long getTimeout() { + public Long getTimeout() { return timeout; } - public void setTimeout(long timeout) { + public void setTimeout(Long timeout) { this.timeout = timeout; } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java index d3ea29e..8b5c5a8 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java @@ -45,6 +45,26 @@ public class DirectVmComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentConfiguration.java index de1d07d..c6c9b80 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentConfiguration.java @@ -18,6 +18,7 @@ package org.apache.camel.component.directvm.springboot; import org.apache.camel.spi.HeaderFilterStrategy; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * The direct-vm component provides direct synchronous call to another endpoint @@ -37,12 +38,13 @@ public class DirectVmComponentConfiguration { /** * The timeout value to use if block is enabled. */ - private long timeout = 30000; + private Long timeout = 30000; /** * Sets a HeaderFilterStrategy that will only be applied on producer * endpoints (on both directions: request and response). Default value: * none. */ + @NestedConfigurationProperty private HeaderFilterStrategy headerFilterStrategy; /** * Whether to propagate or not properties from the producer side to the @@ -58,11 +60,11 @@ public class DirectVmComponentConfiguration { this.block = block; } - public long getTimeout() { + public Long getTimeout() { return timeout; } - public void setTimeout(long timeout) { + public void setTimeout(Long timeout) { this.timeout = timeout; } http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java index dcfaa46..79b0fb0 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java @@ -44,6 +44,26 @@ public class LogComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentConfiguration.java index 8b40ee6..c7a8ecc 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentConfiguration.java @@ -18,6 +18,7 @@ package org.apache.camel.component.log.springboot; import org.apache.camel.spi.ExchangeFormatter; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * The log component logs message exchanges to the underlying logging mechanism. @@ -32,6 +33,7 @@ public class LogComponentConfiguration { * suitable for logging. If not specified we default to * DefaultExchangeFormatter. */ + @NestedConfigurationProperty private ExchangeFormatter exchangeFormatter; public ExchangeFormatter getExchangeFormatter() { http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java index d4f8fb0..9ea63c5 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java @@ -45,6 +45,26 @@ public class PropertiesComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java index 9bb02df..431d43e 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java @@ -20,6 +20,7 @@ import java.util.Properties; import org.apache.camel.component.properties.PropertiesParser; import org.apache.camel.component.properties.PropertiesResolver; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * The properties component is used for using property placeholders in endpoint @@ -52,10 +53,12 @@ public class PropertiesComponentConfiguration { /** * To use a custom PropertiesResolver */ + @NestedConfigurationProperty private PropertiesResolver propertiesResolver; /** * To use a custom PropertiesParser */ + @NestedConfigurationProperty private PropertiesParser propertiesParser; /** * Whether or not to cache loaded properties. The default value is true. http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java index 4efa583..5010365 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java @@ -44,6 +44,26 @@ public class RestComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java index 897a713..09a56a7 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java @@ -45,6 +45,26 @@ public class SchedulerComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java index 8278164..09e9357 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java @@ -44,6 +44,26 @@ public class SedaComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java index fe2c2c1..2fd48d0 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java @@ -19,6 +19,7 @@ package org.apache.camel.component.seda.springboot; import org.apache.camel.Exchange; import org.apache.camel.component.seda.BlockingQueueFactory; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * The seda component provides asynchronous call to another endpoint from any @@ -41,6 +42,7 @@ public class SedaComponentConfiguration { /** * Sets the default queue factory. */ + @NestedConfigurationProperty private BlockingQueueFactory<Exchange> defaultQueueFactory; public Integer getQueueSize() { http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java index 451c9b9..8b1de4f 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java @@ -44,6 +44,26 @@ public class StubComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java index d2db266..0fb98c0 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java @@ -19,6 +19,7 @@ package org.apache.camel.component.stub.springboot; import org.apache.camel.Exchange; import org.apache.camel.component.seda.BlockingQueueFactory; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * The stub component provides a simple way to stub out any physical endpoints @@ -41,6 +42,7 @@ public class StubComponentConfiguration { /** * Sets the default queue factory. */ + @NestedConfigurationProperty private BlockingQueueFactory<Exchange> defaultQueueFactory; public Integer getQueueSize() { http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java index 1510856..a081945 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java @@ -45,6 +45,26 @@ public class ValidatorComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentConfiguration.java index 40e5a2d..e17bf22 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentConfiguration.java @@ -18,6 +18,7 @@ package org.apache.camel.component.validator.springboot; import org.apache.camel.component.validator.ValidatorResourceResolverFactory; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * Validates the payload of a message using XML Schema and JAXP Validation. @@ -31,6 +32,7 @@ public class ValidatorComponentConfiguration { * To use a custom LSResourceResolver which depends on a dynamic endpoint * resource URI */ + @NestedConfigurationProperty private ValidatorResourceResolverFactory resourceResolverFactory; public ValidatorResourceResolverFactory getResourceResolverFactory() { http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java index 8fb3b6a..634bc3f 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java @@ -44,6 +44,26 @@ public class VmComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java index bf6ffee..7372d9e 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java @@ -19,6 +19,7 @@ package org.apache.camel.component.vm.springboot; import org.apache.camel.Exchange; import org.apache.camel.component.seda.BlockingQueueFactory; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * The vm component provides asynchronous call to another endpoint from the same @@ -41,6 +42,7 @@ public class VmComponentConfiguration { /** * Sets the default queue factory. */ + @NestedConfigurationProperty private BlockingQueueFactory<Exchange> defaultQueueFactory; public Integer getQueueSize() { http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java index 8b927e5..ae5ea0e 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java @@ -44,6 +44,26 @@ public class XsltComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentConfiguration.java index 202f644..a9782b4 100644 --- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentConfiguration.java +++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentConfiguration.java @@ -16,10 +16,12 @@ */ package org.apache.camel.component.xslt.springboot; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.URIResolver; import org.apache.camel.component.xslt.XsltUriResolverFactory; -import org.apache.camel.converter.jaxp.XmlConverter; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * Transforms the message using a XSLT template. @@ -33,13 +35,14 @@ public class XsltComponentConfiguration { * To use a custom implementation of * org.apache.camel.converter.jaxp.XmlConverter */ - private XmlConverter xmlConverter; + private XmlConverterNestedConfiguration xmlConverter; /** * To use a custom javax.xml.transform.URIResolver which depends on a * dynamic endpoint resource URI or which is a subclass of XsltUriResolver. * Do not use in combination with uriResolver. See also link * setUriResolver(URIResolver). */ + @NestedConfigurationProperty private XsltUriResolverFactory uriResolverFactory; /** * To use a custom javax.xml.transform.URIResolver. Do not use in @@ -62,11 +65,11 @@ public class XsltComponentConfiguration { */ private Boolean saxon; - public XmlConverter getXmlConverter() { + public XmlConverterNestedConfiguration getXmlConverter() { return xmlConverter; } - public void setXmlConverter(XmlConverter xmlConverter) { + public void setXmlConverter(XmlConverterNestedConfiguration xmlConverter) { this.xmlConverter = xmlConverter; } @@ -101,4 +104,27 @@ public class XsltComponentConfiguration { public void setSaxon(Boolean saxon) { this.saxon = saxon; } + + public static class XmlConverterNestedConfiguration { + public static final Class CAMEL_NESTED_CLASS = org.apache.camel.converter.jaxp.XmlConverter.class; + private DocumentBuilderFactory documentBuilderFactory; + private TransformerFactory transformerFactory; + + public DocumentBuilderFactory getDocumentBuilderFactory() { + return documentBuilderFactory; + } + + public void setDocumentBuilderFactory( + DocumentBuilderFactory documentBuilderFactory) { + this.documentBuilderFactory = documentBuilderFactory; + } + + public TransformerFactory getTransformerFactory() { + return transformerFactory; + } + + public void setTransformerFactory(TransformerFactory transformerFactory) { + this.transformerFactory = transformerFactory; + } + } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java index dafa6fa..8c70a6b 100644 --- a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java +++ b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java @@ -46,6 +46,26 @@ public class DigitalSignatureComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentConfiguration.java b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentConfiguration.java index 17a8378..385c3b0 100644 --- a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentConfiguration.java +++ b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentConfiguration.java @@ -21,9 +21,11 @@ import java.security.PrivateKey; import java.security.PublicKey; import java.security.SecureRandom; import java.security.cert.Certificate; -import org.apache.camel.component.crypto.DigitalSignatureConfiguration; +import org.apache.camel.CamelContext; +import org.apache.camel.component.crypto.CryptoOperation; import org.apache.camel.util.jsse.KeyStoreParameters; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * The crypto component is used for signing and verifying exchanges using the @@ -35,280 +37,306 @@ import org.springframework.boot.context.properties.ConfigurationProperties; public class DigitalSignatureComponentConfiguration { /** - * To use the shared DigitalSignatureConfiguration as configuration. - * Properties of the shared configuration can also be set individually. + * To use the shared DigitalSignatureConfiguration as configuration */ - private DigitalSignatureConfiguration configuration; - /** - * The logical name of this operation. - */ - private String name; - /** - * Sets the JCE name of the Algorithm that should be used for the signer. - */ - private String algorithm; - /** - * Sets the alias used to query the KeyStore for keys and link Certificate - * Certificates to be used in signing and verifying exchanges. This value - * can be provided at runtime via the message header link - * DigitalSignatureConstantsKEYSTORE_ALIAS - */ - private String alias; - /** - * Set the PrivateKey that should be used to sign the exchange - */ - private PrivateKey privateKey; - /** - * Sets the reference name for a PrivateKey that can be fond in the - * registry. - */ - private String privateKeyName; - /** - * Set the PublicKey that should be used to verify the signature in the - * exchange. - */ - private PublicKey publicKey; - /** - * Sets the reference name for a publicKey that can be fond in the registry. - */ - private String publicKeyName; - /** - * Set the Certificate that should be used to verify the signature in the - * exchange based on its payload. - */ - private Certificate certificate; - /** - * Sets the reference name for a PrivateKey that can be fond in the - * registry. - */ - private String certificateName; - /** - * Sets the KeyStore that can contain keys and Certficates for use in - * signing and verifying exchanges. A KeyStore is typically used with an - * alias either one supplied in the Route definition or dynamically via the - * message header CamelSignatureKeyStoreAlias. If no alias is supplied and - * there is only a single entry in the Keystore then this single entry will - * be used. - */ - private KeyStore keystore; - /** - * Sets the reference name for a Keystore that can be fond in the registry. - */ - private String keystoreName; - /** - * Sets the password used to access an aliased PrivateKey in the KeyStore. - */ - private char[] password; - /** - * Sets the KeyStore that can contain keys and Certficates for use in - * signing and verifying exchanges based on the given KeyStoreParameters. A - * KeyStore is typically used with an alias either one supplied in the Route - * definition or dynamically via the message header - * CamelSignatureKeyStoreAlias. If no alias is supplied and there is only a - * single entry in the Keystore then this single entry will be used. - */ - private KeyStoreParameters keyStoreParameters; - /** - * Sets the reference name for a SecureRandom that can be fond in the - * registry. - */ - private String secureRandomName; - /** - * Set the SecureRandom used to initialize the Signature service - */ - private SecureRandom secureRandom; - /** - * Set the size of the buffer used to read in the Exchange payload data. - */ - private Integer bufferSize; - /** - * Set the id of the security provider that provides the configured - * Signature algorithm. - */ - private String provider; - /** - * Set the name of the message header that should be used to store the - * base64 encoded signature. This defaults to 'CamelDigitalSignature' - */ - private String signatureHeaderName; - /** - * Determines if the Signature specific headers be cleared after signing and - * verification. Defaults to true and should only be made otherwise at your - * extreme peril as vital private information such as Keys and passwords may - * escape if unset. - */ - private Boolean clearHeaders; - /** - * Set the Crypto operation from that supplied after the crypto scheme in - * the endpoint uri e.g. crypto:sign sets sign as the operation. - */ - private String cryptoOperation; + private DigitalSignatureConfigurationNestedConfiguration configuration; - public DigitalSignatureConfiguration getConfiguration() { + public DigitalSignatureConfigurationNestedConfiguration getConfiguration() { return configuration; } - public void setConfiguration(DigitalSignatureConfiguration configuration) { + public void setConfiguration( + DigitalSignatureConfigurationNestedConfiguration configuration) { this.configuration = configuration; } - public String getName() { - return name; - } + public static class DigitalSignatureConfigurationNestedConfiguration { + public static final Class CAMEL_NESTED_CLASS = org.apache.camel.component.crypto.DigitalSignatureConfiguration.class; + @NestedConfigurationProperty + private CamelContext camelContext; + /** + * The logical name of this operation. + */ + private String name; + /** + * Sets the JCE name of the Algorithm that should be used for the + * signer. + */ + private String algorithm = "SHA1WithDSA"; + /** + * Sets the alias used to query the KeyStore for keys and + * {@link java.security.cert.Certificate Certificates} to be used in + * signing and verifying exchanges. This value can be provided at + * runtime via the message header + * {@link org.apache.camel.component.crypto.DigitalSignatureConstants#KEYSTORE_ALIAS} + */ + private String alias; + /** + * Set the PrivateKey that should be used to sign the exchange + * + * @param privateKey + * the key with with to sign the exchange. + */ + private PrivateKey privateKey; + /** + * Sets the reference name for a PrivateKey that can be fond in the + * registry. + */ + private String privateKeyName; + /** + * Set the PublicKey that should be used to verify the signature in the + * exchange. + */ + private PublicKey publicKey; + /** + * Sets the reference name for a publicKey that can be fond in the + * registry. + */ + private String publicKeyName; + /** + * Set the Certificate that should be used to verify the signature in + * the exchange based on its payload. + */ + private Certificate certificate; + /** + * Sets the reference name for a PrivateKey that can be fond in the + * registry. + */ + private String certificateName; + /** + * Sets the KeyStore that can contain keys and Certficates for use in + * signing and verifying exchanges. A {@link KeyStore} is typically used + * with an alias, either one supplied in the Route definition or + * dynamically via the message header "CamelSignatureKeyStoreAlias". If + * no alias is supplied and there is only a single entry in the + * Keystore, then this single entry will be used. + */ + private KeyStore keystore; + /** + * Sets the reference name for a Keystore that can be fond in the + * registry. + */ + private String keystoreName; + /** + * Sets the password used to access an aliased {@link PrivateKey} in the + * KeyStore. + */ + private char[] password; + /** + * Sets the KeyStore that can contain keys and Certficates for use in + * signing and verifying exchanges based on the given + * KeyStoreParameters. A {@link KeyStore} is typically used with an + * alias, either one supplied in the Route definition or dynamically via + * the message header "CamelSignatureKeyStoreAlias". If no alias is + * supplied and there is only a single entry in the Keystore, then this + * single entry will be used. + */ + @NestedConfigurationProperty + private KeyStoreParameters keyStoreParameters; + /** + * Set the SecureRandom used to initialize the Signature service + * + * @param secureRandom + * the random used to init the Signature service + */ + private SecureRandom secureRandom; + /** + * Sets the reference name for a SecureRandom that can be fond in the + * registry. + */ + private String secureRandomName; + /** + * Set the size of the buffer used to read in the Exchange payload data. + */ + private Integer bufferSize; + /** + * Set the id of the security provider that provides the configured + * {@link Signature} algorithm. + * + * @param provider + * the id of the security provider + */ + private String provider; + /** + * Set the name of the message header that should be used to store the + * base64 encoded signature. This defaults to 'CamelDigitalSignature' + */ + private String signatureHeaderName; + /** + * Determines if the Signature specific headers be cleared after signing + * and verification. Defaults to true, and should only be made otherwise + * at your extreme peril as vital private information such as Keys and + * passwords may escape if unset. + */ + private Boolean clearHeaders; + private CryptoOperation cryptoOperation; + + public CamelContext getCamelContext() { + return camelContext; + } + + public void setCamelContext(CamelContext camelContext) { + this.camelContext = camelContext; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getAlgorithm() { + return algorithm; + } + + public void setAlgorithm(String algorithm) { + this.algorithm = algorithm; + } + + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + + public PrivateKey getPrivateKey() { + return privateKey; + } + + public void setPrivateKey(PrivateKey privateKey) { + this.privateKey = privateKey; + } + + public String getPrivateKeyName() { + return privateKeyName; + } + + public void setPrivateKeyName(String privateKeyName) { + this.privateKeyName = privateKeyName; + } + + public PublicKey getPublicKey() { + return publicKey; + } + + public void setPublicKey(PublicKey publicKey) { + this.publicKey = publicKey; + } + + public String getPublicKeyName() { + return publicKeyName; + } + + public void setPublicKeyName(String publicKeyName) { + this.publicKeyName = publicKeyName; + } + + public Certificate getCertificate() { + return certificate; + } + + public void setCertificate(Certificate certificate) { + this.certificate = certificate; + } + + public String getCertificateName() { + return certificateName; + } + + public void setCertificateName(String certificateName) { + this.certificateName = certificateName; + } + + public KeyStore getKeystore() { + return keystore; + } + + public void setKeystore(KeyStore keystore) { + this.keystore = keystore; + } + + public String getKeystoreName() { + return keystoreName; + } + + public void setKeystoreName(String keystoreName) { + this.keystoreName = keystoreName; + } + + public char[] getPassword() { + return password; + } - public void setName(String name) { - this.name = name; - } + public void setPassword(char[] password) { + this.password = password; + } - public String getAlgorithm() { - return algorithm; - } + public KeyStoreParameters getKeyStoreParameters() { + return keyStoreParameters; + } - public void setAlgorithm(String algorithm) { - this.algorithm = algorithm; - } + public void setKeyStoreParameters(KeyStoreParameters keyStoreParameters) { + this.keyStoreParameters = keyStoreParameters; + } - public String getAlias() { - return alias; - } + public SecureRandom getSecureRandom() { + return secureRandom; + } - public void setAlias(String alias) { - this.alias = alias; - } + public void setSecureRandom(SecureRandom secureRandom) { + this.secureRandom = secureRandom; + } - public PrivateKey getPrivateKey() { - return privateKey; - } + public String getSecureRandomName() { + return secureRandomName; + } - public void setPrivateKey(PrivateKey privateKey) { - this.privateKey = privateKey; - } + public void setSecureRandomName(String secureRandomName) { + this.secureRandomName = secureRandomName; + } - public String getPrivateKeyName() { - return privateKeyName; - } + public Integer getBufferSize() { + return bufferSize; + } - public void setPrivateKeyName(String privateKeyName) { - this.privateKeyName = privateKeyName; - } + public void setBufferSize(Integer bufferSize) { + this.bufferSize = bufferSize; + } - public PublicKey getPublicKey() { - return publicKey; - } + public String getProvider() { + return provider; + } - public void setPublicKey(PublicKey publicKey) { - this.publicKey = publicKey; - } - - public String getPublicKeyName() { - return publicKeyName; - } - - public void setPublicKeyName(String publicKeyName) { - this.publicKeyName = publicKeyName; - } - - public Certificate getCertificate() { - return certificate; - } - - public void setCertificate(Certificate certificate) { - this.certificate = certificate; - } - - public String getCertificateName() { - return certificateName; - } - - public void setCertificateName(String certificateName) { - this.certificateName = certificateName; - } - - public KeyStore getKeystore() { - return keystore; - } - - public void setKeystore(KeyStore keystore) { - this.keystore = keystore; - } - - public String getKeystoreName() { - return keystoreName; - } - - public void setKeystoreName(String keystoreName) { - this.keystoreName = keystoreName; - } - - public char[] getPassword() { - return password; - } - - public void setPassword(char[] password) { - this.password = password; - } + public void setProvider(String provider) { + this.provider = provider; + } - public KeyStoreParameters getKeyStoreParameters() { - return keyStoreParameters; - } + public String getSignatureHeaderName() { + return signatureHeaderName; + } - public void setKeyStoreParameters(KeyStoreParameters keyStoreParameters) { - this.keyStoreParameters = keyStoreParameters; - } + public void setSignatureHeaderName(String signatureHeaderName) { + this.signatureHeaderName = signatureHeaderName; + } - public String getSecureRandomName() { - return secureRandomName; - } + public Boolean getClearHeaders() { + return clearHeaders; + } - public void setSecureRandomName(String secureRandomName) { - this.secureRandomName = secureRandomName; - } + public void setClearHeaders(Boolean clearHeaders) { + this.clearHeaders = clearHeaders; + } - public SecureRandom getSecureRandom() { - return secureRandom; - } - - public void setSecureRandom(SecureRandom secureRandom) { - this.secureRandom = secureRandom; - } - - public Integer getBufferSize() { - return bufferSize; - } - - public void setBufferSize(Integer bufferSize) { - this.bufferSize = bufferSize; - } - - public String getProvider() { - return provider; - } - - public void setProvider(String provider) { - this.provider = provider; - } - - public String getSignatureHeaderName() { - return signatureHeaderName; - } - - public void setSignatureHeaderName(String signatureHeaderName) { - this.signatureHeaderName = signatureHeaderName; - } - - public Boolean getClearHeaders() { - return clearHeaders; - } - - public void setClearHeaders(Boolean clearHeaders) { - this.clearHeaders = clearHeaders; - } - - public String getCryptoOperation() { - return cryptoOperation; - } + public CryptoOperation getCryptoOperation() { + return cryptoOperation; + } - public void setCryptoOperation(String cryptoOperation) { - this.cryptoOperation = cryptoOperation; + public void setCryptoOperation(CryptoOperation cryptoOperation) { + this.cryptoOperation = cryptoOperation; + } } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java index 52ada16..a52d310 100644 --- a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java +++ b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java @@ -44,6 +44,26 @@ public class CxfRsComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentConfiguration.java b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentConfiguration.java index f517a0e..d84a116 100644 --- a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentConfiguration.java +++ b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentConfiguration.java @@ -18,6 +18,7 @@ package org.apache.camel.component.cxf.jaxrs.springboot; import org.apache.camel.spi.HeaderFilterStrategy; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * The cxfrs component is used for JAX-RS REST services using Apache CXF. @@ -31,6 +32,7 @@ public class CxfRsComponentConfiguration { * To use a custom HeaderFilterStrategy to filter header to and from Camel * message. */ + @NestedConfigurationProperty private HeaderFilterStrategy headerFilterStrategy; public HeaderFilterStrategy getHeaderFilterStrategy() { http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java index 21f5c1e..b07762d 100644 --- a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java +++ b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java @@ -44,6 +44,26 @@ public class CxfComponentAutoConfiguration { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); + for (Map.Entry<String, Object> entry : parameters.entrySet()) { + Object value = entry.getValue(); + Class<?> paramClass = value.getClass(); + if (paramClass.getName().endsWith("NestedConfiguration")) { + Class nestedClass = null; + try { + nestedClass = (Class) paramClass.getDeclaredField( + "CAMEL_NESTED_CLASS").get(null); + HashMap<String, Object> nestedParameters = new HashMap<>(); + IntrospectionSupport.getProperties(value, nestedParameters, + null, false); + Object nestedProperty = nestedClass.newInstance(); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), nestedProperty, + nestedParameters); + entry.setValue(nestedProperty); + } catch (NoSuchFieldException e) { + } + } + } IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters); return component; http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentConfiguration.java b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentConfiguration.java index b98b695..a2a3dac 100644 --- a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentConfiguration.java +++ b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentConfiguration.java @@ -18,6 +18,7 @@ package org.apache.camel.component.cxf.springboot; import org.apache.camel.spi.HeaderFilterStrategy; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * The cxf component is used for SOAP WebServices using Apache CXF. @@ -38,6 +39,7 @@ public class CxfComponentConfiguration { * To use a custom HeaderFilterStrategy to filter header to and from Camel * message. */ + @NestedConfigurationProperty private HeaderFilterStrategy headerFilterStrategy; public Boolean getAllowStreaming() {