[01/38] camel git commit: CAMEL-11291: spring boot starters: allow to hook into auto configuration process

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
38 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[01/38] camel git commit: CAMEL-11291: spring boot starters: allow to hook into auto configuration process

lburgazzoli-2
Repository: camel
Updated Branches:
  refs/heads/master 88225c8fc -> 87d4313c4


http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
index 57dd4649d..aff7b16 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
@@ -16,18 +16,15 @@
  */
 package org.apache.camel.maven.packaging;
 
-import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
-import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.reflect.Modifier;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
-import java.time.Instant;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -42,11 +39,8 @@ import java.util.Set;
 import java.util.TreeSet;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
-
 import javax.annotation.Generated;
 
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
 import org.apache.camel.maven.packaging.model.ComponentModel;
 import org.apache.camel.maven.packaging.model.ComponentOptionModel;
 import org.apache.camel.maven.packaging.model.DataFormatModel;
@@ -67,8 +61,8 @@ import org.apache.maven.project.MavenProject;
 import org.jboss.forge.roaster.Roaster;
 import org.jboss.forge.roaster.model.JavaType;
 import org.jboss.forge.roaster.model.Type;
-import org.jboss.forge.roaster.model.source.AnnotationSource;
 import org.jboss.forge.roaster.model.source.Import;
+import org.jboss.forge.roaster.model.source.Importer;
 import org.jboss.forge.roaster.model.source.JavaClassSource;
 import org.jboss.forge.roaster.model.source.MethodSource;
 import org.jboss.forge.roaster.model.source.PropertySource;
@@ -76,6 +70,7 @@ import org.jboss.forge.roaster.model.util.Formatter;
 import org.jboss.forge.roaster.model.util.Strings;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionMessage;
 import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
@@ -550,7 +545,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
                 List<String> aliases = compModels.stream().map(ComponentModel::getScheme).sorted().collect(Collectors.toList());
 
                 // resolvePropertyPlaceholders is an option which only make sense to use if the component has other options
-                boolean hasOptions = model.getComponentOptions().stream().anyMatch(o -> !o.getName().equals("resolvePropertyPlaceholders"));
+                //boolean hasOptions = model.getComponentOptions().stream().anyMatch(o -> !o.getName().equals("resolvePropertyPlaceholders"));
 
                 // use springboot as sub package name so the code is not in normal
                 // package so the Spring Boot JARs can be optional at runtime
@@ -563,10 +558,8 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
                     overrideComponentName = model.getArtifactId().replace("camel-", "");
                 }
 
-                if (hasOptions) {
-                    createComponentConfigurationSource(pkg, model, overrideComponentName);
-                }
-                createComponentAutoConfigurationSource(pkg, model, aliases, hasOptions, overrideComponentName);
+                createComponentConfigurationSource(pkg, model, overrideComponentName);
+                createComponentAutoConfigurationSource(pkg, model, aliases, overrideComponentName);
                 createComponentSpringFactorySource(pkg, model);
             }
         }
@@ -600,8 +593,6 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
                 DataFormatModel model = dfModels.get(0); // They should be equivalent
                 List<String> aliases = dfModels.stream().map(DataFormatModel::getName).sorted().collect(Collectors.toList());
 
-                boolean hasOptions = !model.getDataFormatOptions().isEmpty();
-
                 // use springboot as sub package name so the code is not in normal
                 // package so the Spring Boot JARs can be optional at runtime
                 int pos = model.getJavaType().lastIndexOf(".");
@@ -613,10 +604,8 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
                     overrideDataFormatName = model.getArtifactId().replace("camel-", "");
                 }
 
-                if (hasOptions) {
-                    createDataFormatConfigurationSource(pkg, model, overrideDataFormatName);
-                }
-                createDataFormatAutoConfigurationSource(pkg, model, aliases, hasOptions, overrideDataFormatName);
+                createDataFormatConfigurationSource(pkg, model, overrideDataFormatName);
+                createDataFormatAutoConfigurationSource(pkg, model, aliases, overrideDataFormatName);
                 createDataFormatSpringFactorySource(pkg, model);
             }
         }
@@ -650,8 +639,6 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
                 LanguageModel model = dfModels.get(0); // They should be equivalent
                 List<String> aliases = dfModels.stream().map(LanguageModel::getName).sorted().collect(Collectors.toList());
 
-                boolean hasOptions = !model.getLanguageOptions().isEmpty();
-
                 // use springboot as sub package name so the code is not in normal
                 // package so the Spring Boot JARs can be optional at runtime
                 int pos = model.getJavaType().lastIndexOf(".");
@@ -663,10 +650,8 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
                     overrideLanguageName = model.getArtifactId().replace("camel-", "");
                 }
 
-                if (hasOptions) {
-                    createLanguageConfigurationSource(pkg, model, overrideLanguageName);
-                }
-                createLanguageAutoConfigurationSource(pkg, model, aliases, hasOptions, overrideLanguageName);
+                createLanguageConfigurationSource(pkg, model, overrideLanguageName);
+                createLanguageAutoConfigurationSource(pkg, model, aliases, overrideLanguageName);
                 createLanguageSpringFactorySource(pkg, model);
             }
         }
@@ -679,6 +664,8 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         String name = model.getJavaType().substring(pos + 1);
         name = name.replace("Component", "ComponentConfiguration");
         javaClass.setPackage(packageName).setName(name);
+        javaClass.extendSuperType(Roaster.create(JavaClassSource.class).setName("ComponentConfigurationPropertiesCommon"));
+        javaClass.addImport("org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon");
 
         String doc = "Generated by camel-package-maven-plugin - do not edit this file!";
         if (!Strings.isBlank(model.getDescription())) {
@@ -1014,9 +1001,9 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         if ("netty4-http".equals(model.getScheme()) || "netty-http".equals(model.getScheme())) {
             String name = option.getName();
             if (name.equals("textline") || name.equals("delimiter") || name.equals("autoAppendDelimiter") || name.equals("decoderMaxLineLength")
-                    || name.equals("encoding") || name.equals("allowDefaultCodec") || name.equals("udpConnectionlessSending") || name.equals("networkInterface")
-                    || name.equals("clientMode") || name.equals("reconnect") || name.equals("reconnectInterval") || name.equals("useByteBuf")
-                    || name.equals("udpByteArrayCodec") || name.equals("broadcast")) {
+                || name.equals("encoding") || name.equals("allowDefaultCodec") || name.equals("udpConnectionlessSending") || name.equals("networkInterface")
+                || name.equals("clientMode") || name.equals("reconnect") || name.equals("reconnectInterval") || name.equals("useByteBuf")
+                || name.equals("udpByteArrayCodec") || name.equals("broadcast")) {
                 return true;
             }
         }
@@ -1031,6 +1018,8 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         String name = model.getJavaType().substring(pos + 1);
         name = name.replace("DataFormat", "DataFormatConfiguration");
         javaClass.setPackage(packageName).setName(name);
+        javaClass.extendSuperType(Roaster.create(JavaClassSource.class).setName("DataFormatConfigurationPropertiesCommon"));
+        javaClass.addImport("org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon");
 
         String doc = "Generated by camel-package-maven-plugin - do not edit this file!";
         if (!Strings.isBlank(model.getDescription())) {
@@ -1094,6 +1083,8 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         String name = model.getJavaType().substring(pos + 1);
         name = name.replace("Language", "LanguageConfiguration");
         javaClass.setPackage(packageName).setName(name);
+        javaClass.extendSuperType(Roaster.create(JavaClassSource.class).setName("LanguageConfigurationPropertiesCommon"));
+        javaClass.addImport("org.apache.camel.spring.boot.LanguageConfigurationPropertiesCommon");
 
         String doc = "Generated by camel-package-maven-plugin - do not edit this file!";
         if (!Strings.isBlank(model.getDescription())) {
@@ -1121,8 +1112,8 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
             } else if ("tokenize".equals(model.getName())) {
                 // and skip following as they are not global options
                 if ("token".equals(option.getName()) || "endToken".equals(option.getName()) || "inheritNamespaceTagName".equals(option.getName())
-                        || "headerName".equals(option.getName()) || "regex".equals(option.getName()) || "xml".equals(option.getName())
-                        || "includeTokens".equals(option.getName()) || "group".equals(option.getName()) || "skipFirst".equals(option.getName())) {
+                    || "headerName".equals(option.getName()) || "regex".equals(option.getName()) || "xml".equals(option.getName())
+                    || "includeTokens".equals(option.getName()) || "group".equals(option.getName()) || "skipFirst".equals(option.getName())) {
                     continue;
                 }
             } else if ("xtokenize".equals(model.getName())) {
@@ -1181,7 +1172,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
     }
 
     private void createComponentAutoConfigurationSource(
-            String packageName, ComponentModel model, List<String> componentAliases, boolean hasOptions, String overrideComponentName) throws MojoFailureException {
+        String packageName, ComponentModel model, List<String> componentAliases, String overrideComponentName) throws MojoFailureException {
 
         final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
 
@@ -1193,119 +1184,246 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
 
         String doc = "Generated by camel-package-maven-plugin - do not edit this file!";
         javaClass.getJavaDoc().setFullText(doc);
-
+        javaClass.extendSuperType(AllNestedConditions.class);
         javaClass.addAnnotation(Generated.class).setStringValue("value", SpringBootAutoConfigurationMojo.class.getName());
         javaClass.addAnnotation(Configuration.class);
-        javaClass.addAnnotation(ConditionalOnBean.class).setStringValue("type", "org.apache.camel.spring.boot.CamelAutoConfiguration");
         javaClass.addAnnotation(Conditional.class).setLiteralValue(name + ".Condition.class");
-        javaClass.addAnnotation(AutoConfigureAfter.class).setStringValue("name", "org.apache.camel.spring.boot.CamelAutoConfiguration");
+        javaClass.addAnnotation(AutoConfigureAfter.class).setLiteralValue("CamelAutoConfiguration.class");
 
         String configurationName = name.replace("ComponentAutoConfiguration", "ComponentConfiguration");
-        if (hasOptions) {
-            AnnotationSource<JavaClassSource> ann = javaClass.addAnnotation(EnableConfigurationProperties.class);
-            ann.setLiteralValue("value", configurationName + ".class");
-
-            javaClass.addImport("java.util.HashMap");
-            javaClass.addImport("java.util.Map");
-            javaClass.addImport("org.apache.camel.util.IntrospectionSupport");
-        }
+        javaClass.addAnnotation(EnableConfigurationProperties.class).setLiteralValue(
+            "{ ComponentConfigurationProperties.class, " + configurationName + ".class }"
+        );
 
+        javaClass.addImport(HashMap.class);
+        javaClass.addImport(Map.class);
+        javaClass.addImport("org.apache.camel.util.IntrospectionSupport");
         javaClass.addImport(model.getJavaType());
+        javaClass.addImport(List.class);
+        javaClass.addImport(ConditionalOnBean.class);
+        javaClass.addImport("org.slf4j.Logger");
+        javaClass.addImport("org.slf4j.LoggerFactory");
         javaClass.addImport("org.apache.camel.CamelContext");
+        javaClass.addImport("org.apache.camel.spi.ComponentCustomizer");
+        javaClass.addImport("org.apache.camel.spring.boot.CamelAutoConfiguration");
+        javaClass.addImport("org.apache.camel.spring.boot.ComponentConfigurationProperties");
+        javaClass.addImport("org.apache.camel.spring.boot.util.GroupCondition");
+        javaClass.addImport("org.apache.camel.util.ObjectHelper");
+
+        javaClass.addField()
+            .setPrivate()
+            .setStatic(true)
+            .setFinal(true)
+            .setName("LOGGER")
+            .setType("Logger")
+            .setLiteralInitializer("LoggerFactory.getLogger(" + name + ".class)");
+
+        javaClass.addField()
+            .setPrivate()
+            .setName("camelContext")
+            .setType("CamelContext")
+            .addAnnotation(Autowired.class);
+
+        javaClass.addField()
+            .setPrivate()
+            .setName("customizers")
+            .setType("List<ComponentCustomizer<" + model.getShortJavaType() + ">>")
+            .addAnnotation(Autowired.class).setLiteralValue("required", "false");
+
+        javaClass.addField()
+            .setPrivate()
+            .setName("globalConfiguration")
+            .setType("ComponentConfigurationProperties")
+            .addAnnotation(Autowired.class);
+
+        javaClass.addField()
+            .setPrivate()
+            .setName("componentConfiguration")
+            .setType(configurationName)
+            .addAnnotation(Autowired.class);
+
+        javaClass.addMethod()
+            .setConstructor(true)
+            .setPublic()
+            .setBody("super(ConfigurationPhase.REGISTER_BEAN);");
+
+        javaClass.addNestedType(
+            Roaster.create(JavaClassSource.class)
+                .setName("OnCamelContext")
+                .setStatic(true)
+                .addAnnotation(ConditionalOnBean.class)
+                    .setLiteralValue("CamelContext.class")
+                    .getOrigin()
+        );
+        javaClass.addNestedType(
+            Roaster.create(JavaClassSource.class)
+                .setName("OnCamelAutoConfiguration")
+                .setStatic(true)
+                .addAnnotation(ConditionalOnBean.class)
+                    .setLiteralValue("CamelAutoConfiguration.class")
+                    .getOrigin()
+        );
+        javaClass.addNestedType(
+            Roaster.create(JavaClassSource.class)
+                .setName("Condition")
+                .setStatic(true)
+                .extendSuperType(Roaster.create(JavaClassSource.class).setName("GroupCondition"))
+                .addMethod()
+                    .setName("Condition")
+                    .setConstructor(true)
+                    .setPublic()
+                    .setBody("super(\"camel.component\", \"camel.component." + (overrideComponentName != null ? overrideComponentName : model.getScheme()).toLowerCase(Locale.US) + "\");")
+                    .getOrigin()
+        );
 
         // add method for auto configure
-        String body = createComponentBody(model.getShortJavaType(), hasOptions);
+        String body = createComponentBody(model.getShortJavaType());
         String methodName = "configure" + model.getShortJavaType();
 
         MethodSource<JavaClassSource> method = javaClass.addMethod()
-                .setName(methodName)
-                .setPublic()
-                .setBody(body)
-                .setReturnType(model.getShortJavaType())
-                .addThrows(Exception.class);
-
-        method.addParameter("CamelContext", "camelContext");
-
-        if (hasOptions) {
-            method.addParameter(configurationName, "configuration");
-        }
+            .setName(methodName)
+            .setPublic()
+            .setBody(body)
+            .setReturnType(model.getShortJavaType())
+            .addThrows(Exception.class);
 
         // Determine all the aliases
         String[] springBeanAliases = componentAliases.stream().map(alias -> alias + "-component").toArray(size -> new String[size]);
 
         method.addAnnotation(Lazy.class);
         method.addAnnotation(Bean.class).setStringArrayValue("name", springBeanAliases);
-        method.addAnnotation(ConditionalOnClass.class).setLiteralValue("value", "CamelContext.class");
-        method.addAnnotation(ConditionalOnMissingBean.class).setLiteralValue("value", model.getShortJavaType() + ".class");
-
-        // Generate Condition
-        javaClass.addNestedType(createConditionType(
-            javaClass,
-            "camel.component",
-            (overrideComponentName != null ? overrideComponentName : model.getScheme()).toLowerCase(Locale.US)
-        ));
+        method.addAnnotation(ConditionalOnClass.class).setLiteralValue("CamelContext.class");
+        method.addAnnotation(ConditionalOnMissingBean.class).setLiteralValue(model.getShortJavaType() + ".class");
 
         sortImports(javaClass);
 
         String fileName = packageName.replaceAll("\\.", "\\/") + "/" + name + ".java";
         writeSourceIfChanged(javaClass, fileName);
-        writeAdditionalSpringMetaData(
-            "camel",
-            "component",
-            (overrideComponentName != null ? overrideComponentName : model.getScheme()).toLowerCase(Locale.US));
     }
 
     private void createDataFormatAutoConfigurationSource(
-            String packageName, DataFormatModel model, List<String> dataFormatAliases, boolean hasOptions, String overrideDataFormatName) throws MojoFailureException {
+        String packageName, DataFormatModel model, List<String> dataFormatAliases, String overrideDataFormatName) throws MojoFailureException {
 
         final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
 
         int pos = model.getJavaType().lastIndexOf(".");
         String name = model.getJavaType().substring(pos + 1);
-        name = name.replace("DataFormat", "DataFormatAutoConfiguration");        
+        name = name.replace("DataFormat", "DataFormatAutoConfiguration");
 
         javaClass.setPackage(packageName).setName(name);
 
         String doc = "Generated by camel-package-maven-plugin - do not edit this file!";
         javaClass.getJavaDoc().setFullText(doc);
-
+        javaClass.extendSuperType(AllNestedConditions.class);
         javaClass.addAnnotation(Generated.class).setStringValue("value", SpringBootAutoConfigurationMojo.class.getName());
         javaClass.addAnnotation(Configuration.class);
-        javaClass.addAnnotation(ConditionalOnBean.class).setStringValue("type", "org.apache.camel.spring.boot.CamelAutoConfiguration");
         javaClass.addAnnotation(Conditional.class).setLiteralValue(name + ".Condition.class");
         javaClass.addAnnotation(AutoConfigureAfter.class).setStringValue("name", "org.apache.camel.spring.boot.CamelAutoConfiguration");
 
         String configurationName = name.replace("DataFormatAutoConfiguration", "DataFormatConfiguration");
-        if (hasOptions) {
-            AnnotationSource<JavaClassSource> ann = javaClass.addAnnotation(EnableConfigurationProperties.class);
-            ann.setLiteralValue("value", configurationName + ".class");
-
-            javaClass.addImport("java.util.HashMap");
-            javaClass.addImport("java.util.Map");
-            javaClass.addImport("org.apache.camel.util.IntrospectionSupport");
-        }
+        javaClass.addAnnotation(EnableConfigurationProperties.class).setLiteralValue(
+            "{ DataFormatConfigurationProperties.class, " + configurationName + ".class }"
+        );
 
-        javaClass.addImport("org.apache.camel.CamelContextAware");
+        javaClass.addImport(HashMap.class);
+        javaClass.addImport(Map.class);
+        javaClass.addImport("org.apache.camel.util.IntrospectionSupport");
         javaClass.addImport(model.getJavaType());
+        javaClass.addImport(List.class);
+        javaClass.addImport(ConditionalOnBean.class);
+        javaClass.addImport("org.slf4j.Logger");
+        javaClass.addImport("org.slf4j.LoggerFactory");
         javaClass.addImport("org.apache.camel.CamelContext");
+        javaClass.addImport("org.apache.camel.CamelContextAware");
+        javaClass.addImport("org.apache.camel.spring.boot.CamelAutoConfiguration");
+        javaClass.addImport("org.apache.camel.spring.boot.DataFormatConfigurationProperties");
+        javaClass.addImport("org.apache.camel.spring.boot.util.GroupCondition");
+        javaClass.addImport("org.apache.camel.util.ObjectHelper");
         javaClass.addImport("org.apache.camel.RuntimeCamelException");
         javaClass.addImport("org.apache.camel.spi.DataFormat");
+        javaClass.addImport("org.apache.camel.spi.DataFormatCustomizer");
         javaClass.addImport("org.apache.camel.spi.DataFormatFactory");
 
-        String body = createDataFormatBody(model.getShortJavaType(), hasOptions);
-        String methodName = "configure" + model.getShortJavaType() + "Factory";
+        javaClass.addField()
+            .setPrivate()
+            .setStatic(true)
+            .setFinal(true)
+            .setName("LOGGER")
+            .setType("Logger")
+            .setLiteralInitializer("LoggerFactory.getLogger(" + name + ".class)");
 
-        MethodSource<JavaClassSource> method = javaClass.addMethod()
-                .setName(methodName)
-                .setPublic()
-                .setBody(body)
-                .setReturnType("org.apache.camel.spi.DataFormatFactory");
+        javaClass.addField()
+            .setPrivate()
+            .setName("camelContext")
+            .setType("CamelContext")
+            .addAnnotation(Autowired.class);
 
-        method.addParameter("CamelContext", "camelContext").setFinal(true);
+        javaClass.addField()
+            .setPrivate()
+            .setName("customizers")
+            .setType("List<DataFormatCustomizer<" + model.getShortJavaType() + ">>")
+            .addAnnotation(Autowired.class)
+                .setLiteralValue("required", "false");
 
-        if (hasOptions) {
-            method.addParameter(configurationName, "configuration").setFinal(true);
-        }
+        javaClass.addField()
+            .setPrivate()
+            .setName("globalConfiguration")
+            .setType("DataFormatConfigurationProperties")
+            .addAnnotation(Autowired.class);
+
+        javaClass.addField()
+            .setPrivate()
+            .setName("dataformatConfiguration")
+            .setType(configurationName)
+            .addAnnotation(Autowired.class);
+
+        javaClass.addMethod()
+            .setConstructor(true)
+            .setPublic()
+            .setBody("super(ConfigurationPhase.REGISTER_BEAN);");
+
+        javaClass.addNestedType(
+            Roaster.create(JavaClassSource.class)
+                .setName("OnCamelContext")
+                .setStatic(true)
+                .addAnnotation(ConditionalOnBean.class)
+                    .setLiteralValue("CamelContext.class")
+                    .getOrigin()
+        );
+        javaClass.addNestedType(
+            Roaster.create(JavaClassSource.class)
+                .setName("OnCamelAutoConfiguration")
+                .setStatic(true)
+                .addAnnotation(ConditionalOnBean.class)
+                    .setLiteralValue("CamelAutoConfiguration.class")
+                    .getOrigin()
+        );
+        javaClass.addNestedType(
+            Roaster.create(JavaClassSource.class)
+                .setName("Condition")
+                .setStatic(true)
+                .extendSuperType(Roaster.create(JavaClassSource.class).setName("GroupCondition"))
+                .addAnnotation(ConditionalOnBean.class)
+                    .setLiteralValue("CamelAutoConfiguration.class")
+                    .getOrigin()
+                .addMethod()
+                    .setName("Condition")
+                    .setConstructor(true)
+                    .setPublic()
+                    .setBody("super(\"camel.dataformat\", \"camel.dataformat." + (overrideDataFormatName != null ? overrideDataFormatName : model.getName()).toLowerCase(Locale.US) + "\");")
+                    .getOrigin()
+        );
+
+
+        String body = createDataFormatBody(model.getShortJavaType());
+        String methodName = "configure" + model.getShortJavaType() + "Factory";
+
+        MethodSource<JavaClassSource> method = javaClass.addMethod()
+            .setName(methodName)
+            .setPublic()
+            .setBody(body)
+            .setReturnType("org.apache.camel.spi.DataFormatFactory")
+            .addThrows(Exception.class);
 
         // Determine all the aliases
         // adding the '-dataformat' suffix to prevent collision with component names
@@ -1315,25 +1433,14 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         method.addAnnotation(ConditionalOnClass.class).setLiteralValue("value", "CamelContext.class");
         method.addAnnotation(ConditionalOnMissingBean.class).setLiteralValue("value", model.getShortJavaType() + ".class");
 
-        // Generate Condition
-        javaClass.addNestedType(createConditionType(
-            javaClass,
-            "camel.dataformat",
-            (overrideDataFormatName != null ? overrideDataFormatName : model.getName()).toLowerCase(Locale.US)
-        ));
-
         sortImports(javaClass);
 
         String fileName = packageName.replaceAll("\\.", "\\/") + "/" + name + ".java";
         writeSourceIfChanged(javaClass, fileName);
-        writeAdditionalSpringMetaData(
-            "camel",
-            "dataformat",
-            (overrideDataFormatName != null ? overrideDataFormatName : model.getName()).toLowerCase(Locale.US));
     }
 
     private void createLanguageAutoConfigurationSource(
-            String packageName, LanguageModel model, List<String> languageAliases, boolean hasOptions, String overrideLanguageName) throws MojoFailureException {
+        String packageName, LanguageModel model, List<String> languageAliases, String overrideLanguageName) throws MojoFailureException {
 
         final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
 
@@ -1345,39 +1452,111 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
 
         String doc = "Generated by camel-package-maven-plugin - do not edit this file!";
         javaClass.getJavaDoc().setFullText(doc);
-
+        javaClass.extendSuperType(AllNestedConditions.class);
         javaClass.addAnnotation(Generated.class).setStringValue("value", SpringBootAutoConfigurationMojo.class.getName());
         javaClass.addAnnotation(Configuration.class);
-        javaClass.addAnnotation(ConditionalOnBean.class).setStringValue("type", "org.apache.camel.spring.boot.CamelAutoConfiguration");
         javaClass.addAnnotation(Conditional.class).setLiteralValue(name + ".Condition.class");
-        javaClass.addAnnotation(AutoConfigureAfter.class).setStringValue("name", "org.apache.camel.spring.boot.CamelAutoConfiguration");
+        javaClass.addAnnotation(AutoConfigureAfter.class).setLiteralValue("CamelAutoConfiguration.class");
 
         String configurationName = name.replace("LanguageAutoConfiguration", "LanguageConfiguration");
-        if (hasOptions) {
-            AnnotationSource<JavaClassSource> ann = javaClass.addAnnotation(EnableConfigurationProperties.class);
-            ann.setLiteralValue("value", configurationName + ".class");
-
-            javaClass.addImport("java.util.HashMap");
-            javaClass.addImport("java.util.Map");
-            javaClass.addImport("org.apache.camel.util.IntrospectionSupport");
-        }
+        javaClass.addAnnotation(EnableConfigurationProperties.class).setLiteralValue(
+            "{ LanguageConfigurationProperties.class, " + configurationName + ".class }"
+        );
+        javaClass.addImport(HashMap.class);
+        javaClass.addImport(Map.class);
+        javaClass.addImport("org.apache.camel.util.IntrospectionSupport");
 
-        javaClass.addImport("org.apache.camel.CamelContextAware");
         javaClass.addImport(model.getJavaType());
+        javaClass.addImport(List.class);
+        javaClass.addImport(ConditionalOnBean.class);
+        javaClass.addImport("org.slf4j.Logger");
+        javaClass.addImport("org.slf4j.LoggerFactory");
         javaClass.addImport("org.apache.camel.CamelContext");
+        javaClass.addImport("org.apache.camel.CamelContextAware");
+        javaClass.addImport("org.apache.camel.spring.boot.CamelAutoConfiguration");
+        javaClass.addImport("org.apache.camel.spring.boot.LanguageConfigurationProperties");
+        javaClass.addImport("org.apache.camel.spring.boot.util.GroupCondition");
+        javaClass.addImport("org.apache.camel.util.ObjectHelper");
+        javaClass.addImport("org.apache.camel.spi.LanguageCustomizer");
+
+        javaClass.addField()
+            .setPrivate()
+            .setStatic(true)
+            .setFinal(true)
+            .setName("LOGGER")
+            .setType("Logger")
+            .setLiteralInitializer("LoggerFactory.getLogger(" + name + ".class)");
+
+        javaClass.addField()
+            .setPrivate()
+            .setName("camelContext")
+            .setType("CamelContext")
+            .addAnnotation(Autowired.class);
+
+        javaClass.addField()
+            .setPrivate()
+            .setName("customizers")
+            .setType("List<LanguageCustomizer<" + model.getShortJavaType() + ">>")
+            .addAnnotation(Autowired.class).setLiteralValue("required", "false");
+
+        javaClass.addField()
+            .setPrivate()
+            .setName("globalConfiguration")
+            .setType("LanguageConfigurationProperties")
+            .addAnnotation(Autowired.class);
+
+        javaClass.addField()
+            .setPrivate()
+            .setName("languageConfiguration")
+            .setType(configurationName)
+            .addAnnotation(Autowired.class);
+
+        javaClass.addMethod()
+            .setConstructor(true)
+            .setPublic()
+            .setBody("super(ConfigurationPhase.REGISTER_BEAN);");
 
-        String body = createLanguageBody(model.getShortJavaType(), hasOptions);
+        javaClass.addNestedType(
+            Roaster.create(JavaClassSource.class)
+                .setName("OnCamelContext")
+                .setStatic(true)
+                .addAnnotation(ConditionalOnBean.class)
+                    .setLiteralValue("CamelContext.class")
+                    .getOrigin()
+        );
+        javaClass.addNestedType(
+            Roaster.create(JavaClassSource.class)
+                .setName("OnCamelAutoConfiguration")
+                .setStatic(true)
+                .addAnnotation(ConditionalOnBean.class)
+                    .setLiteralValue("CamelAutoConfiguration.class")
+                    .getOrigin()
+        );
+        javaClass.addNestedType(
+            Roaster.create(JavaClassSource.class)
+                .setName("Condition")
+                .setStatic(true)
+                .extendSuperType(Roaster.create(JavaClassSource.class).setName("GroupCondition"))
+                .addAnnotation(ConditionalOnBean.class)
+                    .setLiteralValue("CamelAutoConfiguration.class")
+                    .getOrigin()
+                .addMethod()
+                    .setName("Condition")
+                    .setConstructor(true)
+                    .setPublic()
+                    .setBody("super(\"camel.component\", \"camel.component." + (overrideLanguageName != null ? overrideLanguageName : model.getName()).toLowerCase(Locale.US) + "\");")
+                    .getOrigin()
+        );
+
+        String body = createLanguageBody(model.getShortJavaType());
         String methodName = "configure" + model.getShortJavaType();
 
         MethodSource<JavaClassSource> method = javaClass.addMethod()
-                .setName(methodName)
-                .setPublic()
-                .setBody(body)
-                .setReturnType(model.getShortJavaType())
-                .addThrows(Exception.class);
-
-        method.addParameter("CamelContext", "camelContext");
-        method.addParameter(configurationName, "configuration");
+            .setName(methodName)
+            .setPublic()
+            .setBody(body)
+            .setReturnType(model.getShortJavaType())
+            .addThrows(Exception.class);
 
         // Determine all the aliases
         // adding the '-language' suffix to prevent collision with component names
@@ -1388,21 +1567,10 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         method.addAnnotation(ConditionalOnClass.class).setLiteralValue("value", "CamelContext.class");
         method.addAnnotation(ConditionalOnMissingBean.class).setLiteralValue("value", model.getShortJavaType() + ".class");
 
-        // Generate Condition
-        javaClass.addNestedType(createConditionType(
-            javaClass,
-            "camel.language",
-            (overrideLanguageName != null ? overrideLanguageName : model.getName()).toLowerCase(Locale.US)
-        ));
-
         sortImports(javaClass);
 
         String fileName = packageName.replaceAll("\\.", "\\/") + "/" + name + ".java";
         writeSourceIfChanged(javaClass, fileName);
-        writeAdditionalSpringMetaData(
-            "camel",
-            "language",
-            (overrideLanguageName != null ? overrideLanguageName : model.getName()).toLowerCase(Locale.US));
     }
 
     private void createComponentSpringFactorySource(String packageName, ComponentModel model) throws MojoFailureException {
@@ -1429,40 +1597,48 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         writeComponentSpringFactorySource(packageName, name);
     }
 
-    private static String createComponentBody(String shortJavaType, boolean hasOptions) {
+    private static String createComponentBody(String shortJavaType) {
         StringBuilder sb = new StringBuilder();
         sb.append(shortJavaType).append(" component = new ").append(shortJavaType).append("();").append("\n");
         sb.append("component.setCamelContext(camelContext);\n");
         sb.append("\n");
-        if (hasOptions) {
-            sb.append("Map<String, Object> parameters = new HashMap<>();\n");
-            sb.append("IntrospectionSupport.getProperties(configuration, parameters, null, false);\n");
-            sb.append("\n");
-            sb.append("for (Map.Entry<String, Object> entry : parameters.entrySet()) {\n");
-            sb.append("    Object value = entry.getValue();\n");
-            sb.append("    Class<?> paramClass = value.getClass();\n");
-            sb.append("    if (paramClass.getName().endsWith(\"NestedConfiguration\")) {\n");
-            sb.append("        Class nestedClass = null;\n");
-            sb.append("        try {\n");
-            sb.append("            nestedClass = (Class) paramClass.getDeclaredField(\"CAMEL_NESTED_CLASS\").get(null);\n");
-            sb.append("            HashMap<String, Object> nestedParameters = new HashMap<>();\n");
-            sb.append("            IntrospectionSupport.getProperties(value, nestedParameters, null, false);\n");
-            sb.append("            Object nestedProperty = nestedClass.newInstance();\n");
-            sb.append("            IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), nestedProperty, nestedParameters);\n");
-            sb.append("            entry.setValue(nestedProperty);\n");
-            sb.append("        } catch (NoSuchFieldException e) {\n");
-            sb.append("            // ignore, class must not be a nested configuration class after all\n");
-            sb.append("        }\n");
-            sb.append("    }\n");
-            sb.append("}\n");
-            sb.append("IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters);\n");
-        }
+        sb.append("Map<String, Object> parameters = new HashMap<>();\n");
+        sb.append("IntrospectionSupport.getProperties(componentConfiguration, parameters, null, false);\n");
+        sb.append("\n");
+        sb.append("for (Map.Entry<String, Object> entry : parameters.entrySet()) {\n");
+        sb.append("    Object value = entry.getValue();\n");
+        sb.append("    Class<?> paramClass = value.getClass();\n");
+        sb.append("    if (paramClass.getName().endsWith(\"NestedConfiguration\")) {\n");
+        sb.append("        Class nestedClass = null;\n");
+        sb.append("        try {\n");
+        sb.append("            nestedClass = (Class) paramClass.getDeclaredField(\"CAMEL_NESTED_CLASS\").get(null);\n");
+        sb.append("            HashMap<String, Object> nestedParameters = new HashMap<>();\n");
+        sb.append("            IntrospectionSupport.getProperties(value, nestedParameters, null, false);\n");
+        sb.append("            Object nestedProperty = nestedClass.newInstance();\n");
+        sb.append("            IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), nestedProperty, nestedParameters);\n");
+        sb.append("            entry.setValue(nestedProperty);\n");
+        sb.append("        } catch (NoSuchFieldException e) {\n");
+        sb.append("            // ignore, class must not be a nested configuration class after all\n");
+        sb.append("        }\n");
+        sb.append("    }\n");
+        sb.append("}\n");
+        sb.append("IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), component, parameters);\n");
+        sb.append("\n");
+        sb.append("boolean useConfigurers = globalConfiguration.getConfigurer().isEnabled() && componentConfiguration.getConfigurer().isEnabled();\n");
+        sb.append("\n");
+        sb.append("if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {\n");
+        sb.append("    for (ComponentCustomizer<").append(shortJavaType).append("> configurer : customizers) {\n");
+        sb.append("        LOGGER.debug(\"Configure component {}, with configurer {}\", component, configurer);\n");
+        sb.append("        configurer.customize(component);\n");
+        sb.append("    }\n");
+        sb.append("}\n");
         sb.append("\n");
         sb.append("return component;");
+
         return sb.toString();
     }
 
-    private static String createDataFormatBody(String shortJavaType, boolean hasOptions) {
+    private static String createDataFormatBody(String shortJavaType) {
         StringBuilder sb = new StringBuilder();
         sb.append("return new DataFormatFactory() {\n");
         sb.append("    public DataFormat newInstance() {\n");
@@ -1473,16 +1649,23 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         sb.append("                contextAware.setCamelContext(camelContext);\n");
         sb.append("            }\n");
         sb.append("        }\n");
-        if (hasOptions) {
-            sb.append("\n");
-            sb.append("        try {\n");
-            sb.append("            Map<String, Object> parameters = new HashMap<>();\n");
-            sb.append("            IntrospectionSupport.getProperties(configuration, parameters, null, false);\n");
-            sb.append("            IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), dataformat, parameters);\n");
-            sb.append("        } catch (Exception e) {\n");
-            sb.append("            throw new RuntimeCamelException(e);\n");
-            sb.append("        }\n");
-        }
+        sb.append("\n");
+        sb.append("        try {\n");
+        sb.append("            Map<String, Object> parameters = new HashMap<>();\n");
+        sb.append("            IntrospectionSupport.getProperties(dataformatConfiguration, parameters, null, false);\n");
+        sb.append("            IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), dataformat, parameters);\n");
+        sb.append("        } catch (Exception e) {\n");
+        sb.append("            throw new RuntimeCamelException(e);\n");
+        sb.append("        }\n");
+        sb.append("\n");
+        sb.append("boolean useConfigurers = globalConfiguration.getConfigurer().isEnabled() && dataformatConfiguration.getConfigurer().isEnabled();\n");
+        sb.append("\n");
+        sb.append("if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {\n");
+        sb.append("    for (DataFormatCustomizer<").append(shortJavaType).append("> configurer : customizers) {\n");
+        sb.append("        LOGGER.debug(\"Configure dataformat {}, with configurer {}\", dataformat, configurer);\n");
+        sb.append("        configurer.customize(dataformat);\n");
+        sb.append("    }\n");
+        sb.append("}\n");
         sb.append("\n");
         sb.append("        return dataformat;\n");
         sb.append("    }\n");
@@ -1490,7 +1673,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         return sb.toString();
     }
 
-    private static String createLanguageBody(String shortJavaType, boolean hasOptions) {
+    private static String createLanguageBody(String shortJavaType) {
         StringBuilder sb = new StringBuilder();
         sb.append(shortJavaType).append(" language = new ").append(shortJavaType).append("();").append("\n");
         sb.append("if (CamelContextAware.class.isAssignableFrom(").append(shortJavaType).append(".class)) {\n");
@@ -1499,21 +1682,27 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         sb.append("        contextAware.setCamelContext(camelContext);\n");
         sb.append("    }\n");
         sb.append("}\n");
-        if (hasOptions) {
-            sb.append("\n");
-            sb.append("Map<String, Object> parameters = new HashMap<>();\n");
-            sb.append("IntrospectionSupport.getProperties(configuration, parameters, null, false);\n");
-            sb.append("\n");
-            sb.append("IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), language, parameters);\n");
-        }
+        sb.append("\n");
+        sb.append("Map<String, Object> parameters = new HashMap<>();\n");
+        sb.append("IntrospectionSupport.getProperties(languageConfiguration, parameters, null, false);\n");
+        sb.append("IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), language, parameters);\n");
+        sb.append("\n");
+        sb.append("boolean useConfigurers = globalConfiguration.getConfigurer().isEnabled() && languageConfiguration.getConfigurer().isEnabled();\n");
+        sb.append("\n");
+        sb.append("if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {\n");
+        sb.append("    for (LanguageCustomizer<").append(shortJavaType).append("> configurer : customizers) {\n");
+        sb.append("        LOGGER.debug(\"Configure language {}, with configurer {}\", language, configurer);\n");
+        sb.append("        configurer.customize(language);\n");
+        sb.append("    }\n");
+        sb.append("}\n");
         sb.append("\n");
         sb.append("return language;");
         return sb.toString();
     }
 
-    private static void sortImports(JavaClassSource javaClass) {
+    private static void sortImports(Importer importer) {
         // sort imports
-        List<Import> imports = javaClass.getImports();
+        List<Import> imports = importer.getImports();
 
         // sort imports
         List<String> names = new ArrayList<>();
@@ -1548,21 +1737,14 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
 
         // remove all imports first
         for (String name : names) {
-            javaClass.removeImport(name);
+            importer.removeImport(name);
         }
         // and add them back in correct order
         for (String name : names) {
-            javaClass.addImport(name);
+            importer.addImport(name);
         }
     }
 
-    private static String sourceToString(JavaClassSource javaClass) {
-        String code = Formatter.format(javaClass);
-        // convert tabs to 4 spaces
-        code = code.replaceAll("\\t", "    ");
-        return code;
-    }
-
     private static String loadModelJson(Set<File> jsonFiles, String modelName) {
         try {
             for (File file : jsonFiles) {
@@ -1874,6 +2056,13 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
     }
 
     private void writeSourceIfChanged(JavaClassSource source, String fileName) throws MojoFailureException {
+        writeSourceIfChanged(source.toString(), fileName);
+    }
+
+    private void writeSourceIfChanged(String source, String fileName) throws MojoFailureException {
+
+        source = Formatter.format(source);
+        source = source.replaceAll("\\t", "    ");
 
         File target = new File(SpringBootHelper.starterSrcDir(baseDir, project.getArtifactId()), fileName);
 
@@ -1882,7 +2071,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         try {
             InputStream is = getClass().getClassLoader().getResourceAsStream("license-header-java.txt");
             String header = loadText(is);
-            String code = sourceToString(source);
+            String code = source;
             code = header + code;
             getLog().debug("Source code generated:\n" + code);
 
@@ -1974,6 +2163,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         }
     }
 
+    /*
     private void writeAdditionalSpringMetaData(String prefix, String type, String name) throws MojoFailureException {
         String fullQualifiedName = prefix + "." + type + "." + name + "." + "enabled";
         String fileName = "META-INF/additional-spring-configuration-metadata.json";
@@ -2019,6 +2209,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
             throw new MojoFailureException("IOError with file " + target, e);
         }
     }
+    */
 
     private void deleteFileOnMainArtifact(File starterFile) {
         if (!DELETE_FILES_ON_MAIN_ARTIFACTS) {
@@ -2048,7 +2239,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         condition.extendSuperType(SpringBootCondition.class);
         condition.setPublic();
         condition.setStatic(true);
-        
+
         condition.addAnnotation(Generated.class).setStringValue("value", SpringBootAutoConfigurationMojo.class.getName());
 
         String fullQualifiedType = prefix.endsWith(".") ? prefix +  type : prefix + "." + type;

Reply | Threaded
Open this post in threaded view
|

[02/38] camel git commit: CAMEL-11291: spring boot starters: allow to hook into auto configuration process

lburgazzoli-2
http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java
index 7bb1d70..b736904 100644
--- a/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.xmlsecurity.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,72 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.dataformat.xmlsecurity.XMLSecurityDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(XMLSecurityDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(XMLSecurityDataFormatConfiguration.class)
-public class XMLSecurityDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        XMLSecurityDataFormatConfiguration.class})
+public class XMLSecurityDataFormatAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(XMLSecurityDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<XMLSecurityDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private XMLSecurityDataFormatConfiguration dataformatConfiguration;
+
+    public XMLSecurityDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.securexml");
+        }
+    }
 
     @Bean(name = "secureXML-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(XMLSecurityDataFormat.class)
-    public DataFormatFactory configureXMLSecurityDataFormatFactory(
-            final CamelContext camelContext,
-            final XMLSecurityDataFormatConfiguration configuration) {
+    public DataFormatFactory configureXMLSecurityDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 XMLSecurityDataFormat dataformat = new XMLSecurityDataFormat();
@@ -71,7 +104,7 @@ public class XMLSecurityDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +112,19 @@ public class XMLSecurityDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<XMLSecurityDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.securexml");
-            if (isEnabled(conditionContext, "camel.dataformat.securexml.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatConfiguration.java
index 772b52c..e2f4ed1 100644
--- a/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.xmlsecurity.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.securexml")
-public class XMLSecurityDataFormatConfiguration {
+public class XMLSecurityDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * The cipher algorithm to be used for encryption/decryption of the XML

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmpp-starter/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmpp-starter/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-xmpp-starter/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentAutoConfiguration.java
index 5b21da0..82eda07 100644
--- a/platforms/spring-boot/components-starter/camel-xmpp-starter/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmpp-starter/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentAutoConfiguration.java
@@ -16,68 +16,114 @@
  */
 package org.apache.camel.component.xmpp.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.xmpp.XmppComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(XmppComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class XmppComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        XmppComponentConfiguration.class})
+public class XmppComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(XmppComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<XmppComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private XmppComponentConfiguration componentConfiguration;
+
+    public XmppComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.xmpp");
+        }
+    }
 
     @Lazy
     @Bean(name = "xmpp-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(XmppComponent.class)
-    public XmppComponent configureXmppComponent(CamelContext camelContext)
-            throws Exception {
+    public XmppComponent configureXmppComponent() throws Exception {
         XmppComponent component = new XmppComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.xmpp");
-            if (isEnabled(conditionContext, "camel.component.xmpp.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<XmppComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmpp-starter/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmpp-starter/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-xmpp-starter/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentConfiguration.java
index 2663cb7..5385577 100644
--- a/platforms/spring-boot/components-starter/camel-xmpp-starter/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmpp-starter/src/main/java/org/apache/camel/component/xmpp/springboot/XmppComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.xmpp.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -23,8 +25,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.xmpp")
-public class XmppComponentConfiguration {
+public class XmppComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java
index 58f86c8..8631de2 100644
--- a/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.xstream.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,71 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.dataformat.xstream.JsonDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(JsonDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(JsonDataFormatConfiguration.class)
-public class JsonDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        JsonDataFormatConfiguration.class})
+public class JsonDataFormatAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(JsonDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<JsonDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private JsonDataFormatConfiguration dataformatConfiguration;
+
+    public JsonDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.json-xstream");
+        }
+    }
 
     @Bean(name = "json-xstream-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(JsonDataFormat.class)
-    public DataFormatFactory configureJsonDataFormatFactory(
-            final CamelContext camelContext,
-            final JsonDataFormatConfiguration configuration) {
+    public DataFormatFactory configureJsonDataFormatFactory() throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 JsonDataFormat dataformat = new JsonDataFormat();
@@ -71,7 +103,7 @@ public class JsonDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +111,19 @@ public class JsonDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<JsonDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.json-xstream");
-            if (isEnabled(conditionContext, "camel.dataformat.json-xstream.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
index d56f19a..a5353dd 100644
--- a/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
@@ -19,6 +19,7 @@ package org.apache.camel.dataformat.xstream.springboot;
 import javax.annotation.Generated;
 import org.apache.camel.dataformat.xstream.JsonDataFormat;
 import org.apache.camel.model.dataformat.JsonLibrary;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -28,7 +29,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.json-xstream")
-public class JsonDataFormatConfiguration {
+public class JsonDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * Lookup and use the existing ObjectMapper with the given id when using

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java
index 3d5b520..2561ef6 100644
--- a/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.xstream.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,72 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.dataformat.xstream.XStreamDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(XStreamDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(XStreamDataFormatConfiguration.class)
-public class XStreamDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        XStreamDataFormatConfiguration.class})
+public class XStreamDataFormatAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(XStreamDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<XStreamDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private XStreamDataFormatConfiguration dataformatConfiguration;
+
+    public XStreamDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.xstream");
+        }
+    }
 
     @Bean(name = "xstream-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(XStreamDataFormat.class)
-    public DataFormatFactory configureXStreamDataFormatFactory(
-            final CamelContext camelContext,
-            final XStreamDataFormatConfiguration configuration) {
+    public DataFormatFactory configureXStreamDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 XStreamDataFormat dataformat = new XStreamDataFormat();
@@ -71,7 +104,7 @@ public class XStreamDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +112,19 @@ public class XStreamDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<XStreamDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.xstream");
-            if (isEnabled(conditionContext, "camel.dataformat.xstream.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatConfiguration.java
index 4921355..0c4e5f9 100644
--- a/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatConfiguration.java
@@ -19,6 +19,7 @@ package org.apache.camel.dataformat.xstream.springboot;
 import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -28,7 +29,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.xstream")
-public class XStreamDataFormatConfiguration {
+public class XStreamDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * Adds permissions that controls which Java packages and classes XStream is

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java
index 219e800..0d772ab 100644
--- a/platforms/spring-boot/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java
@@ -17,49 +17,81 @@
 package org.apache.camel.component.yammer.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.yammer.YammerComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(YammerComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(YammerComponentConfiguration.class)
-public class YammerComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        YammerComponentConfiguration.class})
+public class YammerComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(YammerComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<YammerComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private YammerComponentConfiguration componentConfiguration;
+
+    public YammerComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.yammer");
+        }
+    }
 
     @Lazy
     @Bean(name = "yammer-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(YammerComponent.class)
-    public YammerComponent configureYammerComponent(CamelContext camelContext,
-            YammerComponentConfiguration configuration) throws Exception {
+    public YammerComponent configureYammerComponent() throws Exception {
         YammerComponent component = new YammerComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -82,32 +114,16 @@ public class YammerComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.yammer");
-            if (isEnabled(conditionContext, "camel.component.yammer.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<YammerComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentConfiguration.java
index 752766f..71bab8d 100644
--- a/platforms/spring-boot/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentConfiguration.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.yammer.springboot;
 import javax.annotation.Generated;
 import org.apache.camel.component.yammer.ApiRequestor;
 import org.apache.camel.component.yammer.YammerFunctionType;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -29,7 +30,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.yammer")
-public class YammerComponentConfiguration {
+public class YammerComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * The consumer key

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-zendesk-starter/src/main/java/org/apache/camel/component/zendesk/springboot/ZendeskComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-zendesk-starter/src/main/java/org/apache/camel/component/zendesk/springboot/ZendeskComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-zendesk-starter/src/main/java/org/apache/camel/component/zendesk/springboot/ZendeskComponentAutoConfiguration.java
index 0bd35c0..935817a 100644
--- a/platforms/spring-boot/components-starter/camel-zendesk-starter/src/main/java/org/apache/camel/component/zendesk/springboot/ZendeskComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-zendesk-starter/src/main/java/org/apache/camel/component/zendesk/springboot/ZendeskComponentAutoConfiguration.java
@@ -17,50 +17,81 @@
 package org.apache.camel.component.zendesk.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.zendesk.ZendeskComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(ZendeskComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(ZendeskComponentConfiguration.class)
-public class ZendeskComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        ZendeskComponentConfiguration.class})
+public class ZendeskComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(ZendeskComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<ZendeskComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private ZendeskComponentConfiguration componentConfiguration;
+
+    public ZendeskComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.zendesk");
+        }
+    }
 
     @Lazy
     @Bean(name = "zendesk-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(ZendeskComponent.class)
-    public ZendeskComponent configureZendeskComponent(
-            CamelContext camelContext,
-            ZendeskComponentConfiguration configuration) throws Exception {
+    public ZendeskComponent configureZendeskComponent() throws Exception {
         ZendeskComponent component = new ZendeskComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -83,32 +114,16 @@ public class ZendeskComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.zendesk");
-            if (isEnabled(conditionContext, "camel.component.zendesk.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<ZendeskComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-zendesk-starter/src/main/java/org/apache/camel/component/zendesk/springboot/ZendeskComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-zendesk-starter/src/main/java/org/apache/camel/component/zendesk/springboot/ZendeskComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-zendesk-starter/src/main/java/org/apache/camel/component/zendesk/springboot/ZendeskComponentConfiguration.java
index e81d23f..d7b2bb6 100644
--- a/platforms/spring-boot/components-starter/camel-zendesk-starter/src/main/java/org/apache/camel/component/zendesk/springboot/ZendeskComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-zendesk-starter/src/main/java/org/apache/camel/component/zendesk/springboot/ZendeskComponentConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.zendesk.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.NestedConfigurationProperty;
 import org.zendesk.client.v2.Zendesk;
@@ -28,7 +29,9 @@ import org.zendesk.client.v2.Zendesk;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.zendesk")
-public class ZendeskComponentConfiguration {
+public class ZendeskComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * To use the shared configuration

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java
index 9772e7d..690252a 100644
--- a/platforms/spring-boot/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.zipfile.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,72 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.dataformat.zipfile.ZipFileDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(ZipFileDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(ZipFileDataFormatConfiguration.class)
-public class ZipFileDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        ZipFileDataFormatConfiguration.class})
+public class ZipFileDataFormatAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(ZipFileDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<ZipFileDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private ZipFileDataFormatConfiguration dataformatConfiguration;
+
+    public ZipFileDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.zipfile");
+        }
+    }
 
     @Bean(name = "zipfile-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(ZipFileDataFormat.class)
-    public DataFormatFactory configureZipFileDataFormatFactory(
-            final CamelContext camelContext,
-            final ZipFileDataFormatConfiguration configuration) {
+    public DataFormatFactory configureZipFileDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 ZipFileDataFormat dataformat = new ZipFileDataFormat();
@@ -71,7 +104,7 @@ public class ZipFileDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +112,19 @@ public class ZipFileDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<ZipFileDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.zipfile");
-            if (isEnabled(conditionContext, "camel.dataformat.zipfile.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatConfiguration.java
index d08996a..ff336d4 100644
--- a/platforms/spring-boot/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.zipfile.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.zipfile")
-public class ZipFileDataFormatConfiguration {
+public class ZipFileDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * If the zip file has more then one entry the setting this option to true

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-zookeeper-master-starter/src/main/java/org/apache/camel/component/zookeepermaster/springboot/MasterComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-zookeeper-master-starter/src/main/java/org/apache/camel/component/zookeepermaster/springboot/MasterComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-zookeeper-master-starter/src/main/java/org/apache/camel/component/zookeepermaster/springboot/MasterComponentAutoConfiguration.java
index 1162a59..d3e739c 100644
--- a/platforms/spring-boot/components-starter/camel-zookeeper-master-starter/src/main/java/org/apache/camel/component/zookeepermaster/springboot/MasterComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-zookeeper-master-starter/src/main/java/org/apache/camel/component/zookeepermaster/springboot/MasterComponentAutoConfiguration.java
@@ -17,49 +17,81 @@
 package org.apache.camel.component.zookeepermaster.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.zookeepermaster.MasterComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(MasterComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(MasterComponentConfiguration.class)
-public class MasterComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        MasterComponentConfiguration.class})
+public class MasterComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(MasterComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<MasterComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private MasterComponentConfiguration componentConfiguration;
+
+    public MasterComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.zookeeper-master");
+        }
+    }
 
     @Lazy
     @Bean(name = "zookeeper-master-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(MasterComponent.class)
-    public MasterComponent configureMasterComponent(CamelContext camelContext,
-            MasterComponentConfiguration configuration) throws Exception {
+    public MasterComponent configureMasterComponent() throws Exception {
         MasterComponent component = new MasterComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -82,32 +114,16 @@ public class MasterComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.zookeeper-master");
-            if (isEnabled(conditionContext,
-                    "camel.component.zookeeper-master.", groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<MasterComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-zookeeper-master-starter/src/main/java/org/apache/camel/component/zookeepermaster/springboot/MasterComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-zookeeper-master-starter/src/main/java/org/apache/camel/component/zookeepermaster/springboot/MasterComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-zookeeper-master-starter/src/main/java/org/apache/camel/component/zookeepermaster/springboot/MasterComponentConfiguration.java
index 5e0ed69..9a46622 100644
--- a/platforms/spring-boot/components-starter/camel-zookeeper-master-starter/src/main/java/org/apache/camel/component/zookeepermaster/springboot/MasterComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-zookeeper-master-starter/src/main/java/org/apache/camel/component/zookeepermaster/springboot/MasterComponentConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.zookeepermaster.springboot;
 
 import javax.annotation.Generated;
 import org.apache.camel.component.zookeepermaster.ContainerIdFactory;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.apache.curator.framework.CuratorFramework;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.NestedConfigurationProperty;
@@ -30,7 +31,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.zookeeper-master")
-public class MasterComponentConfiguration {
+public class MasterComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * To use a custom ContainerIdFactory for creating container ids.

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java
index 209747a..399dc76 100644
--- a/platforms/spring-boot/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java
@@ -17,50 +17,81 @@
 package org.apache.camel.component.zookeeper.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.zookeeper.ZooKeeperComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(ZooKeeperComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(ZooKeeperComponentConfiguration.class)
-public class ZooKeeperComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        ZooKeeperComponentConfiguration.class})
+public class ZooKeeperComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(ZooKeeperComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<ZooKeeperComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private ZooKeeperComponentConfiguration componentConfiguration;
+
+    public ZooKeeperComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.zookeeper");
+        }
+    }
 
     @Lazy
     @Bean(name = "zookeeper-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(ZooKeeperComponent.class)
-    public ZooKeeperComponent configureZooKeeperComponent(
-            CamelContext camelContext,
-            ZooKeeperComponentConfiguration configuration) throws Exception {
+    public ZooKeeperComponent configureZooKeeperComponent() throws Exception {
         ZooKeeperComponent component = new ZooKeeperComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -83,32 +114,16 @@ public class ZooKeeperComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.zookeeper");
-            if (isEnabled(conditionContext, "camel.component.zookeeper.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<ZooKeeperComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentConfiguration.java
index 9e4d2cc..6516813 100644
--- a/platforms/spring-boot/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.zookeeper.springboot;
 
 import java.util.List;
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
 
@@ -28,7 +29,9 @@ import org.springframework.boot.context.properties.DeprecatedConfigurationProper
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.zookeeper")
-public class ZooKeeperComponentConfiguration {
+public class ZooKeeperComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * To use a shared ZooKeeperConfiguration

Reply | Threaded
Open this post in threaded view
|

[03/38] camel git commit: CAMEL-11291: spring boot starters: allow to hook into auto configuration process

lburgazzoli-2
In reply to this post by lburgazzoli-2
http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java
index 34f7d3c..00ee529 100644
--- a/platforms/spring-boot/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java
@@ -17,50 +17,81 @@
 package org.apache.camel.component.velocity.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.velocity.VelocityComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(VelocityComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(VelocityComponentConfiguration.class)
-public class VelocityComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        VelocityComponentConfiguration.class})
+public class VelocityComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(VelocityComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<VelocityComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private VelocityComponentConfiguration componentConfiguration;
+
+    public VelocityComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.velocity");
+        }
+    }
 
     @Lazy
     @Bean(name = "velocity-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(VelocityComponent.class)
-    public VelocityComponent configureVelocityComponent(
-            CamelContext camelContext,
-            VelocityComponentConfiguration configuration) throws Exception {
+    public VelocityComponent configureVelocityComponent() throws Exception {
         VelocityComponent component = new VelocityComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -83,32 +114,16 @@ public class VelocityComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.velocity");
-            if (isEnabled(conditionContext, "camel.component.velocity.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<VelocityComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentConfiguration.java
index ab13c27..582a412 100644
--- a/platforms/spring-boot/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.velocity.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.apache.velocity.app.VelocityEngine;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.NestedConfigurationProperty;
@@ -28,7 +29,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.velocity")
-public class VelocityComponentConfiguration {
+public class VelocityComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * To use the VelocityEngine otherwise a new engine is created

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java
index d5c6724..3ad0380 100644
--- a/platforms/spring-boot/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java
@@ -17,49 +17,81 @@
 package org.apache.camel.component.vertx.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.vertx.VertxComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(VertxComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(VertxComponentConfiguration.class)
-public class VertxComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        VertxComponentConfiguration.class})
+public class VertxComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(VertxComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<VertxComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private VertxComponentConfiguration componentConfiguration;
+
+    public VertxComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.vertx");
+        }
+    }
 
     @Lazy
     @Bean(name = "vertx-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(VertxComponent.class)
-    public VertxComponent configureVertxComponent(CamelContext camelContext,
-            VertxComponentConfiguration configuration) throws Exception {
+    public VertxComponent configureVertxComponent() throws Exception {
         VertxComponent component = new VertxComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -82,32 +114,16 @@ public class VertxComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.vertx");
-            if (isEnabled(conditionContext, "camel.component.vertx.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<VertxComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java
index 12d6417..feb4685 100644
--- a/platforms/spring-boot/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java
@@ -20,6 +20,7 @@ import javax.annotation.Generated;
 import io.vertx.core.Vertx;
 import io.vertx.core.VertxOptions;
 import io.vertx.core.spi.VertxFactory;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
@@ -31,7 +32,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.vertx")
-public class VertxComponentConfiguration {
+public class VertxComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * To use a custom VertxFactory implementation

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-weather-starter/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-weather-starter/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-weather-starter/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentAutoConfiguration.java
index 6e09f0d..44177c1 100644
--- a/platforms/spring-boot/components-starter/camel-weather-starter/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-weather-starter/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentAutoConfiguration.java
@@ -16,68 +16,114 @@
  */
 package org.apache.camel.component.weather.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.weather.WeatherComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(WeatherComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class WeatherComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        WeatherComponentConfiguration.class})
+public class WeatherComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(WeatherComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<WeatherComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private WeatherComponentConfiguration componentConfiguration;
+
+    public WeatherComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.weather");
+        }
+    }
 
     @Lazy
     @Bean(name = "weather-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(WeatherComponent.class)
-    public WeatherComponent configureWeatherComponent(CamelContext camelContext)
-            throws Exception {
+    public WeatherComponent configureWeatherComponent() throws Exception {
         WeatherComponent component = new WeatherComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.weather");
-            if (isEnabled(conditionContext, "camel.component.weather.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<WeatherComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-weather-starter/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-weather-starter/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-weather-starter/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentConfiguration.java
index 7389950..8cf8bb1 100644
--- a/platforms/spring-boot/components-starter/camel-weather-starter/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-weather-starter/src/main/java/org/apache/camel/component/weather/springboot/WeatherComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.weather.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -23,8 +25,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.weather")
-public class WeatherComponentConfiguration {
+public class WeatherComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java
index 864d4f3..7802b40 100644
--- a/platforms/spring-boot/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java
@@ -17,50 +17,81 @@
 package org.apache.camel.component.websocket.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.websocket.WebsocketComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(WebsocketComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(WebsocketComponentConfiguration.class)
-public class WebsocketComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        WebsocketComponentConfiguration.class})
+public class WebsocketComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(WebsocketComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<WebsocketComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private WebsocketComponentConfiguration componentConfiguration;
+
+    public WebsocketComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.websocket");
+        }
+    }
 
     @Lazy
     @Bean(name = "websocket-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(WebsocketComponent.class)
-    public WebsocketComponent configureWebsocketComponent(
-            CamelContext camelContext,
-            WebsocketComponentConfiguration configuration) throws Exception {
+    public WebsocketComponent configureWebsocketComponent() throws Exception {
         WebsocketComponent component = new WebsocketComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -83,32 +114,16 @@ public class WebsocketComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.websocket");
-            if (isEnabled(conditionContext, "camel.component.websocket.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<WebsocketComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentConfiguration.java
index 27331a6..4eb7880 100644
--- a/platforms/spring-boot/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentConfiguration.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.websocket.springboot;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.component.websocket.WebSocketFactory;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.apache.camel.util.jsse.SSLContextParameters;
 import org.eclipse.jetty.util.thread.ThreadPool;
 import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -32,7 +33,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.websocket")
-public class WebsocketComponentConfiguration {
+public class WebsocketComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Set a resource path for static resources (such as .html files etc). The

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java
index cfd5297..b49b18e 100644
--- a/platforms/spring-boot/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.converter.xmlbeans.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,72 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.converter.xmlbeans.XmlBeansDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(XmlBeansDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(XmlBeansDataFormatConfiguration.class)
-public class XmlBeansDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        XmlBeansDataFormatConfiguration.class})
+public class XmlBeansDataFormatAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(XmlBeansDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<XmlBeansDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private XmlBeansDataFormatConfiguration dataformatConfiguration;
+
+    public XmlBeansDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.xmlbeans");
+        }
+    }
 
     @Bean(name = "xmlBeans-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(XmlBeansDataFormat.class)
-    public DataFormatFactory configureXmlBeansDataFormatFactory(
-            final CamelContext camelContext,
-            final XmlBeansDataFormatConfiguration configuration) {
+    public DataFormatFactory configureXmlBeansDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 XmlBeansDataFormat dataformat = new XmlBeansDataFormat();
@@ -71,7 +104,7 @@ public class XmlBeansDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +112,19 @@ public class XmlBeansDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<XmlBeansDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.xmlbeans");
-            if (isEnabled(conditionContext, "camel.dataformat.xmlbeans.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatConfiguration.java
index 1ff358b..0369549 100644
--- a/platforms/spring-boot/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.converter.xmlbeans.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.xmlbeans")
-public class XmlBeansDataFormatConfiguration {
+public class XmlBeansDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * To enable pretty printing output nicely formatted. Is by default false.

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java
index ad00be1..617be09 100644
--- a/platforms/spring-boot/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.xmljson.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,72 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.dataformat.xmljson.XmlJsonDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(XmlJsonDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(XmlJsonDataFormatConfiguration.class)
-public class XmlJsonDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        XmlJsonDataFormatConfiguration.class})
+public class XmlJsonDataFormatAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(XmlJsonDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<XmlJsonDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private XmlJsonDataFormatConfiguration dataformatConfiguration;
+
+    public XmlJsonDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.xmljson");
+        }
+    }
 
     @Bean(name = "xmljson-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(XmlJsonDataFormat.class)
-    public DataFormatFactory configureXmlJsonDataFormatFactory(
-            final CamelContext camelContext,
-            final XmlJsonDataFormatConfiguration configuration) {
+    public DataFormatFactory configureXmlJsonDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 XmlJsonDataFormat dataformat = new XmlJsonDataFormat();
@@ -71,7 +104,7 @@ public class XmlJsonDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +112,19 @@ public class XmlJsonDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<XmlJsonDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.xmljson");
-            if (isEnabled(conditionContext, "camel.dataformat.xmljson.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatConfiguration.java
index 63741af..6e211a1 100644
--- a/platforms/spring-boot/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.dataformat.xmljson.springboot;
 
 import java.util.List;
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -27,7 +28,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.xmljson")
-public class XmlJsonDataFormatConfiguration {
+public class XmlJsonDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * Sets the encoding. Used for unmarshalling (JSON to XML conversion).

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentAutoConfiguration.java
index c4ae448..2033b02 100644
--- a/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentAutoConfiguration.java
@@ -16,68 +16,114 @@
  */
 package org.apache.camel.component.xmlrpc.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.xmlrpc.XmlRpcComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(XmlRpcComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class XmlRpcComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        XmlRpcComponentConfiguration.class})
+public class XmlRpcComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(XmlRpcComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<XmlRpcComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private XmlRpcComponentConfiguration componentConfiguration;
+
+    public XmlRpcComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.xmlrpc");
+        }
+    }
 
     @Lazy
     @Bean(name = "xmlrpc-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(XmlRpcComponent.class)
-    public XmlRpcComponent configureXmlRpcComponent(CamelContext camelContext)
-            throws Exception {
+    public XmlRpcComponent configureXmlRpcComponent() throws Exception {
         XmlRpcComponent component = new XmlRpcComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.xmlrpc");
-            if (isEnabled(conditionContext, "camel.component.xmlrpc.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<XmlRpcComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentConfiguration.java
index 08d52b6..34de982 100644
--- a/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/component/xmlrpc/springboot/XmlRpcComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.xmlrpc.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -23,8 +25,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.xmlrpc")
-public class XmlRpcComponentConfiguration {
+public class XmlRpcComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java
index 81f0b5e..bfe20cb 100644
--- a/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.xmlrpc.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,72 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.dataformat.xmlrpc.XmlRpcDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(XmlRpcDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(XmlRpcDataFormatConfiguration.class)
-public class XmlRpcDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        XmlRpcDataFormatConfiguration.class})
+public class XmlRpcDataFormatAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(XmlRpcDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<XmlRpcDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private XmlRpcDataFormatConfiguration dataformatConfiguration;
+
+    public XmlRpcDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.xmlrpc");
+        }
+    }
 
     @Bean(name = "xmlrpc-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(XmlRpcDataFormat.class)
-    public DataFormatFactory configureXmlRpcDataFormatFactory(
-            final CamelContext camelContext,
-            final XmlRpcDataFormatConfiguration configuration) {
+    public DataFormatFactory configureXmlRpcDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 XmlRpcDataFormat dataformat = new XmlRpcDataFormat();
@@ -71,7 +104,7 @@ public class XmlRpcDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +112,19 @@ public class XmlRpcDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<XmlRpcDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.xmlrpc");
-            if (isEnabled(conditionContext, "camel.dataformat.xmlrpc.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatConfiguration.java
index b66d2c3..ffc2681 100644
--- a/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.xmlrpc.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.xmlrpc")
-public class XmlRpcDataFormatConfiguration {
+public class XmlRpcDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * Whether to marshal/unmarshal request or response Is by default false

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java
index 67fb7a6..78b53c3 100644
--- a/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java
@@ -17,50 +17,82 @@
 package org.apache.camel.component.xmlsecurity.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.xmlsecurity.XmlSignatureComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(XmlSignatureComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(XmlSignatureComponentConfiguration.class)
-public class XmlSignatureComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        XmlSignatureComponentConfiguration.class})
+public class XmlSignatureComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(XmlSignatureComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<XmlSignatureComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private XmlSignatureComponentConfiguration componentConfiguration;
+
+    public XmlSignatureComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.xmlsecurity");
+        }
+    }
 
     @Lazy
     @Bean(name = "xmlsecurity-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(XmlSignatureComponent.class)
-    public XmlSignatureComponent configureXmlSignatureComponent(
-            CamelContext camelContext,
-            XmlSignatureComponentConfiguration configuration) throws Exception {
+    public XmlSignatureComponent configureXmlSignatureComponent()
+            throws Exception {
         XmlSignatureComponent component = new XmlSignatureComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -83,32 +115,16 @@ public class XmlSignatureComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.xmlsecurity");
-            if (isEnabled(conditionContext, "camel.component.xmlsecurity.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<XmlSignatureComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentConfiguration.java
index 0c3f804..91aca48 100644
--- a/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentConfiguration.java
@@ -29,6 +29,7 @@ import org.apache.camel.component.xmlsecurity.api.ValidationFailedHandler;
 import org.apache.camel.component.xmlsecurity.api.XmlSignature2Message;
 import org.apache.camel.component.xmlsecurity.api.XmlSignatureChecker;
 import org.apache.camel.component.xmlsecurity.api.XmlSignatureProperties;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -38,7 +39,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.xmlsecurity")
-public class XmlSignatureComponentConfiguration {
+public class XmlSignatureComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * To use a shared XmlSignerConfiguration configuration to use as base for

Reply | Threaded
Open this post in threaded view
|

[04/38] camel git commit: CAMEL-11291: spring boot starters: allow to hook into auto configuration process

lburgazzoli-2
In reply to this post by lburgazzoli-2
http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java
index 6ee00da..a983eed 100644
--- a/platforms/spring-boot/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.tagsoup.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,72 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.dataformat.tagsoup.TidyMarkupDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(TidyMarkupDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(TidyMarkupDataFormatConfiguration.class)
-public class TidyMarkupDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        TidyMarkupDataFormatConfiguration.class})
+public class TidyMarkupDataFormatAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(TidyMarkupDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<TidyMarkupDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private TidyMarkupDataFormatConfiguration dataformatConfiguration;
+
+    public TidyMarkupDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.tidymarkup");
+        }
+    }
 
     @Bean(name = "tidyMarkup-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(TidyMarkupDataFormat.class)
-    public DataFormatFactory configureTidyMarkupDataFormatFactory(
-            final CamelContext camelContext,
-            final TidyMarkupDataFormatConfiguration configuration) {
+    public DataFormatFactory configureTidyMarkupDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 TidyMarkupDataFormat dataformat = new TidyMarkupDataFormat();
@@ -71,7 +104,7 @@ public class TidyMarkupDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +112,19 @@ public class TidyMarkupDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<TidyMarkupDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.tidymarkup");
-            if (isEnabled(conditionContext, "camel.dataformat.tidymarkup.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatConfiguration.java
index a7fb06a..cc78961 100644
--- a/platforms/spring-boot/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.tagsoup.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.tidymarkup")
-public class TidyMarkupDataFormatConfiguration {
+public class TidyMarkupDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * What data type to unmarshal as can either be org.w3c.dom.Node or

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java
index 2427e92..6a0c4ea 100644
--- a/platforms/spring-boot/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.tarfile.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,72 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.dataformat.tarfile.TarFileDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(TarFileDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(TarFileDataFormatConfiguration.class)
-public class TarFileDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        TarFileDataFormatConfiguration.class})
+public class TarFileDataFormatAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(TarFileDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<TarFileDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private TarFileDataFormatConfiguration dataformatConfiguration;
+
+    public TarFileDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.tarfile");
+        }
+    }
 
     @Bean(name = "tarfile-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(TarFileDataFormat.class)
-    public DataFormatFactory configureTarFileDataFormatFactory(
-            final CamelContext camelContext,
-            final TarFileDataFormatConfiguration configuration) {
+    public DataFormatFactory configureTarFileDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 TarFileDataFormat dataformat = new TarFileDataFormat();
@@ -71,7 +104,7 @@ public class TarFileDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +112,19 @@ public class TarFileDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<TarFileDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.tarfile");
-            if (isEnabled(conditionContext, "camel.dataformat.tarfile.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatConfiguration.java
index ab7836b..75642c2 100644
--- a/platforms/spring-boot/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.tarfile.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.tarfile")
-public class TarFileDataFormatConfiguration {
+public class TarFileDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * If the tar file has more then one entry the setting this option to true

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java
index 0dfd831..170858b 100644
--- a/platforms/spring-boot/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java
@@ -17,50 +17,81 @@
 package org.apache.camel.component.telegram.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.telegram.TelegramComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(TelegramComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(TelegramComponentConfiguration.class)
-public class TelegramComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        TelegramComponentConfiguration.class})
+public class TelegramComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(TelegramComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<TelegramComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private TelegramComponentConfiguration componentConfiguration;
+
+    public TelegramComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.telegram");
+        }
+    }
 
     @Lazy
     @Bean(name = "telegram-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(TelegramComponent.class)
-    public TelegramComponent configureTelegramComponent(
-            CamelContext camelContext,
-            TelegramComponentConfiguration configuration) throws Exception {
+    public TelegramComponent configureTelegramComponent() throws Exception {
         TelegramComponent component = new TelegramComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -83,32 +114,16 @@ public class TelegramComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.telegram");
-            if (isEnabled(conditionContext, "camel.component.telegram.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<TelegramComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentConfiguration.java
index b27d2c9..d3d201e 100644
--- a/platforms/spring-boot/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.telegram.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.telegram")
-public class TelegramComponentConfiguration {
+public class TelegramComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * The default Telegram authorization token to be used when the information

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-tika-starter/src/main/java/org/apache/camel/component/tika/springboot/TikaComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-tika-starter/src/main/java/org/apache/camel/component/tika/springboot/TikaComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-tika-starter/src/main/java/org/apache/camel/component/tika/springboot/TikaComponentAutoConfiguration.java
index c6ab08c..2366b80 100644
--- a/platforms/spring-boot/components-starter/camel-tika-starter/src/main/java/org/apache/camel/component/tika/springboot/TikaComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-tika-starter/src/main/java/org/apache/camel/component/tika/springboot/TikaComponentAutoConfiguration.java
@@ -16,68 +16,114 @@
  */
 package org.apache.camel.component.tika.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.tika.TikaComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(TikaComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class TikaComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        TikaComponentConfiguration.class})
+public class TikaComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(TikaComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<TikaComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private TikaComponentConfiguration componentConfiguration;
+
+    public TikaComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.tika");
+        }
+    }
 
     @Lazy
     @Bean(name = "tika-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(TikaComponent.class)
-    public TikaComponent configureTikaComponent(CamelContext camelContext)
-            throws Exception {
+    public TikaComponent configureTikaComponent() throws Exception {
         TikaComponent component = new TikaComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.tika");
-            if (isEnabled(conditionContext, "camel.component.tika.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<TikaComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-tika-starter/src/main/java/org/apache/camel/component/tika/springboot/TikaComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-tika-starter/src/main/java/org/apache/camel/component/tika/springboot/TikaComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-tika-starter/src/main/java/org/apache/camel/component/tika/springboot/TikaComponentConfiguration.java
index 5f8f7ff..b6e5f55 100644
--- a/platforms/spring-boot/components-starter/camel-tika-starter/src/main/java/org/apache/camel/component/tika/springboot/TikaComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-tika-starter/src/main/java/org/apache/camel/component/tika/springboot/TikaComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.tika.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -24,8 +26,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.tika")
-public class TikaComponentConfiguration {
+public class TikaComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java
index 985ec37..8a31e0c 100644
--- a/platforms/spring-boot/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java
@@ -17,50 +17,81 @@
 package org.apache.camel.component.twitter.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.twitter.TwitterComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(TwitterComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(TwitterComponentConfiguration.class)
-public class TwitterComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        TwitterComponentConfiguration.class})
+public class TwitterComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(TwitterComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<TwitterComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private TwitterComponentConfiguration componentConfiguration;
+
+    public TwitterComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.twitter");
+        }
+    }
 
     @Lazy
     @Bean(name = "twitter-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(TwitterComponent.class)
-    public TwitterComponent configureTwitterComponent(
-            CamelContext camelContext,
-            TwitterComponentConfiguration configuration) throws Exception {
+    public TwitterComponent configureTwitterComponent() throws Exception {
         TwitterComponent component = new TwitterComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -83,32 +114,16 @@ public class TwitterComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.twitter");
-            if (isEnabled(conditionContext, "camel.component.twitter.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<TwitterComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentConfiguration.java
index 624f274..1a0baa6 100644
--- a/platforms/spring-boot/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.twitter.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -27,7 +28,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.twitter")
-public class TwitterComponentConfiguration {
+public class TwitterComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * The access token

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java
index 554bd17..c506afd 100644
--- a/platforms/spring-boot/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java
@@ -17,50 +17,81 @@
 package org.apache.camel.component.undertow.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.undertow.UndertowComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(UndertowComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(UndertowComponentConfiguration.class)
-public class UndertowComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        UndertowComponentConfiguration.class})
+public class UndertowComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(UndertowComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<UndertowComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private UndertowComponentConfiguration componentConfiguration;
+
+    public UndertowComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.undertow");
+        }
+    }
 
     @Lazy
     @Bean(name = "undertow-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(UndertowComponent.class)
-    public UndertowComponent configureUndertowComponent(
-            CamelContext camelContext,
-            UndertowComponentConfiguration configuration) throws Exception {
+    public UndertowComponent configureUndertowComponent() throws Exception {
         UndertowComponent component = new UndertowComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -83,32 +114,16 @@ public class UndertowComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.undertow");
-            if (isEnabled(conditionContext, "camel.component.undertow.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<UndertowComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentConfiguration.java
index 0548f3f..ce3df2d 100644
--- a/platforms/spring-boot/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.undertow.springboot;
 
 import javax.annotation.Generated;
 import org.apache.camel.component.undertow.UndertowHttpBinding;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.apache.camel.util.jsse.SSLContextParameters;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.NestedConfigurationProperty;
@@ -30,7 +31,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.undertow")
-public class UndertowComponentConfiguration {
+public class UndertowComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * To use a custom HttpBinding to control the mapping between Camel message

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java
index fc798a6..936301a 100644
--- a/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.univocity.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,74 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.dataformat.univocity.UniVocityCsvDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(UniVocityCsvDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(UniVocityCsvDataFormatConfiguration.class)
-public class UniVocityCsvDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        UniVocityCsvDataFormatConfiguration.class})
+public class UniVocityCsvDataFormatAutoConfiguration
+        extends
+            AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(UniVocityCsvDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<UniVocityCsvDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private UniVocityCsvDataFormatConfiguration dataformatConfiguration;
+
+    public UniVocityCsvDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.univocity-csv");
+        }
+    }
 
     @Bean(name = "univocity-csv-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(UniVocityCsvDataFormat.class)
-    public DataFormatFactory configureUniVocityCsvDataFormatFactory(
-            final CamelContext camelContext,
-            final UniVocityCsvDataFormatConfiguration configuration) {
+    public DataFormatFactory configureUniVocityCsvDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 UniVocityCsvDataFormat dataformat = new UniVocityCsvDataFormat();
@@ -71,7 +106,7 @@ public class UniVocityCsvDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +114,19 @@ public class UniVocityCsvDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<UniVocityCsvDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.univocity-csv");
-            if (isEnabled(conditionContext, "camel.dataformat.univocity-csv.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatConfiguration.java
index 7c826b0..d7cc0e2 100644
--- a/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.univocity.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.univocity-csv")
-public class UniVocityCsvDataFormatConfiguration {
+public class UniVocityCsvDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * Whether or not all values must be quoted when writing them.

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java
index 44313ec..04f5f21 100644
--- a/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.univocity.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,74 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.dataformat.univocity.UniVocityFixedWidthDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(UniVocityFixedWidthDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(UniVocityFixedWidthDataFormatConfiguration.class)
-public class UniVocityFixedWidthDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        UniVocityFixedWidthDataFormatConfiguration.class})
+public class UniVocityFixedWidthDataFormatAutoConfiguration
+        extends
+            AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(UniVocityFixedWidthDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<UniVocityFixedWidthDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private UniVocityFixedWidthDataFormatConfiguration dataformatConfiguration;
+
+    public UniVocityFixedWidthDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.univocity-fixed");
+        }
+    }
 
     @Bean(name = "univocity-fixed-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(UniVocityFixedWidthDataFormat.class)
-    public DataFormatFactory configureUniVocityFixedWidthDataFormatFactory(
-            final CamelContext camelContext,
-            final UniVocityFixedWidthDataFormatConfiguration configuration) {
+    public DataFormatFactory configureUniVocityFixedWidthDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 UniVocityFixedWidthDataFormat dataformat = new UniVocityFixedWidthDataFormat();
@@ -71,7 +106,7 @@ public class UniVocityFixedWidthDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +114,19 @@ public class UniVocityFixedWidthDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<UniVocityFixedWidthDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.univocity-fixed");
-            if (isEnabled(conditionContext,
-                    "camel.dataformat.univocity-fixed.", groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatConfiguration.java
index 4ac1cf8..5e6b6ed 100644
--- a/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.univocity.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.univocity-fixed")
-public class UniVocityFixedWidthDataFormatConfiguration {
+public class UniVocityFixedWidthDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * Whether or not the trailing characters until new line must be ignored.

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java
index d4e5513..f92acd3 100644
--- a/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.univocity.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,74 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.dataformat.univocity.UniVocityTsvDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(UniVocityTsvDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(UniVocityTsvDataFormatConfiguration.class)
-public class UniVocityTsvDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        UniVocityTsvDataFormatConfiguration.class})
+public class UniVocityTsvDataFormatAutoConfiguration
+        extends
+            AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(UniVocityTsvDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<UniVocityTsvDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private UniVocityTsvDataFormatConfiguration dataformatConfiguration;
+
+    public UniVocityTsvDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.univocity-tsv");
+        }
+    }
 
     @Bean(name = "univocity-tsv-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(UniVocityTsvDataFormat.class)
-    public DataFormatFactory configureUniVocityTsvDataFormatFactory(
-            final CamelContext camelContext,
-            final UniVocityTsvDataFormatConfiguration configuration) {
+    public DataFormatFactory configureUniVocityTsvDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 UniVocityTsvDataFormat dataformat = new UniVocityTsvDataFormat();
@@ -71,7 +106,7 @@ public class UniVocityTsvDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +114,19 @@ public class UniVocityTsvDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<UniVocityTsvDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.univocity-tsv");
-            if (isEnabled(conditionContext, "camel.dataformat.univocity-tsv.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatConfiguration.java
index a04fa0c..a52995a 100644
--- a/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.univocity.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.univocity-tsv")
-public class UniVocityTsvDataFormatConfiguration {
+public class UniVocityTsvDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * The escape character.

Reply | Threaded
Open this post in threaded view
|

[05/38] camel git commit: CAMEL-11291: spring boot starters: allow to hook into auto configuration process

lburgazzoli-2
In reply to this post by lburgazzoli-2
http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageConfiguration.java
index 37968ae..6e393c0 100644
--- a/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.language.spel.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.LanguageConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.language.spel")
-public class SpelLanguageConfiguration {
+public class SpelLanguageConfiguration
+        extends
+            LanguageConfigurationPropertiesCommon {
 
     /**
      * Whether to trim the value to remove leading and trailing whitespaces and

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-ws-starter/src/main/java/org/apache/camel/component/spring/ws/springboot/SpringWebserviceComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-ws-starter/src/main/java/org/apache/camel/component/spring/ws/springboot/SpringWebserviceComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-ws-starter/src/main/java/org/apache/camel/component/spring/ws/springboot/SpringWebserviceComponentAutoConfiguration.java
index d64e3b0..a2d44ae 100644
--- a/platforms/spring-boot/components-starter/camel-spring-ws-starter/src/main/java/org/apache/camel/component/spring/ws/springboot/SpringWebserviceComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-ws-starter/src/main/java/org/apache/camel/component/spring/ws/springboot/SpringWebserviceComponentAutoConfiguration.java
@@ -17,51 +17,84 @@
 package org.apache.camel.component.spring.ws.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.spring.ws.SpringWebserviceComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SpringWebserviceComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SpringWebserviceComponentConfiguration.class)
-public class SpringWebserviceComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SpringWebserviceComponentConfiguration.class})
+public class SpringWebserviceComponentAutoConfiguration
+        extends
+            AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SpringWebserviceComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SpringWebserviceComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SpringWebserviceComponentConfiguration componentConfiguration;
+
+    public SpringWebserviceComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.spring-ws");
+        }
+    }
 
     @Lazy
     @Bean(name = "spring-ws-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SpringWebserviceComponent.class)
-    public SpringWebserviceComponent configureSpringWebserviceComponent(
-            CamelContext camelContext,
-            SpringWebserviceComponentConfiguration configuration)
+    public SpringWebserviceComponent configureSpringWebserviceComponent()
             throws Exception {
         SpringWebserviceComponent component = new SpringWebserviceComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -84,32 +117,16 @@ public class SpringWebserviceComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.spring-ws");
-            if (isEnabled(conditionContext, "camel.component.spring-ws.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SpringWebserviceComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-ws-starter/src/main/java/org/apache/camel/component/spring/ws/springboot/SpringWebserviceComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-ws-starter/src/main/java/org/apache/camel/component/spring/ws/springboot/SpringWebserviceComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-ws-starter/src/main/java/org/apache/camel/component/spring/ws/springboot/SpringWebserviceComponentConfiguration.java
index 4d7bf1c..7829608 100644
--- a/platforms/spring-boot/components-starter/camel-spring-ws-starter/src/main/java/org/apache/camel/component/spring/ws/springboot/SpringWebserviceComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-ws-starter/src/main/java/org/apache/camel/component/spring/ws/springboot/SpringWebserviceComponentConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.spring.ws.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -27,7 +28,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.spring-ws")
-public class SpringWebserviceComponentConfiguration {
+public class SpringWebserviceComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Enable usage of global SSL context parameters.

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java
index 0783c16..ad96849 100644
--- a/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java
@@ -17,49 +17,81 @@
 package org.apache.camel.component.sql.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.sql.SqlComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SqlComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SqlComponentConfiguration.class)
-public class SqlComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SqlComponentConfiguration.class})
+public class SqlComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SqlComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SqlComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SqlComponentConfiguration componentConfiguration;
+
+    public SqlComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.sql");
+        }
+    }
 
     @Lazy
     @Bean(name = "sql-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SqlComponent.class)
-    public SqlComponent configureSqlComponent(CamelContext camelContext,
-            SqlComponentConfiguration configuration) throws Exception {
+    public SqlComponent configureSqlComponent() throws Exception {
         SqlComponent component = new SqlComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -82,32 +114,16 @@ public class SqlComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.sql");
-            if (isEnabled(conditionContext, "camel.component.sql.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SqlComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentConfiguration.java
index 41b913a..4c6af07 100644
--- a/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.sql.springboot;
 
 import javax.annotation.Generated;
 import javax.sql.DataSource;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -27,7 +28,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.sql")
-public class SqlComponentConfiguration {
+public class SqlComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Sets the DataSource to use to communicate with the database.

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java
index c9ef4e5..7b05456 100644
--- a/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java
@@ -17,50 +17,81 @@
 package org.apache.camel.component.sql.stored.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.sql.stored.SqlStoredComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SqlStoredComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SqlStoredComponentConfiguration.class)
-public class SqlStoredComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SqlStoredComponentConfiguration.class})
+public class SqlStoredComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SqlStoredComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SqlStoredComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SqlStoredComponentConfiguration componentConfiguration;
+
+    public SqlStoredComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.sql-stored");
+        }
+    }
 
     @Lazy
     @Bean(name = "sql-stored-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SqlStoredComponent.class)
-    public SqlStoredComponent configureSqlStoredComponent(
-            CamelContext camelContext,
-            SqlStoredComponentConfiguration configuration) throws Exception {
+    public SqlStoredComponent configureSqlStoredComponent() throws Exception {
         SqlStoredComponent component = new SqlStoredComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -83,32 +114,16 @@ public class SqlStoredComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.sql-stored");
-            if (isEnabled(conditionContext, "camel.component.sql-stored.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SqlStoredComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentConfiguration.java
index 234b800..619e9e1 100644
--- a/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.sql.stored.springboot;
 
 import javax.annotation.Generated;
 import javax.sql.DataSource;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -28,7 +29,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.sql-stored")
-public class SqlStoredComponentConfiguration {
+public class SqlStoredComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Sets the DataSource to use to communicate with the database.

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java
index 87750a7..cb6665e 100644
--- a/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java
@@ -17,49 +17,81 @@
 package org.apache.camel.component.ssh.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.ssh.SshComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SshComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SshComponentConfiguration.class)
-public class SshComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SshComponentConfiguration.class})
+public class SshComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SshComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SshComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SshComponentConfiguration componentConfiguration;
+
+    public SshComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.ssh");
+        }
+    }
 
     @Lazy
     @Bean(name = "ssh-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SshComponent.class)
-    public SshComponent configureSshComponent(CamelContext camelContext,
-            SshComponentConfiguration configuration) throws Exception {
+    public SshComponent configureSshComponent() throws Exception {
         SshComponent component = new SshComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -82,32 +114,16 @@ public class SshComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.ssh");
-            if (isEnabled(conditionContext, "camel.component.ssh.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SshComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java
index 2f31426..3cdff1f 100644
--- a/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.ssh.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.apache.sshd.common.KeyPairProvider;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
@@ -30,7 +31,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.ssh")
-public class SshComponentConfiguration {
+public class SshComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * To use the shared SSH configuration

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-stax-starter/src/main/java/org/apache/camel/component/stax/springboot/StAXComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-stax-starter/src/main/java/org/apache/camel/component/stax/springboot/StAXComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-stax-starter/src/main/java/org/apache/camel/component/stax/springboot/StAXComponentAutoConfiguration.java
index fa6e299..01510b1 100644
--- a/platforms/spring-boot/components-starter/camel-stax-starter/src/main/java/org/apache/camel/component/stax/springboot/StAXComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-stax-starter/src/main/java/org/apache/camel/component/stax/springboot/StAXComponentAutoConfiguration.java
@@ -16,68 +16,114 @@
  */
 package org.apache.camel.component.stax.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.stax.StAXComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(StAXComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class StAXComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        StAXComponentConfiguration.class})
+public class StAXComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(StAXComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<StAXComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private StAXComponentConfiguration componentConfiguration;
+
+    public StAXComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.stax");
+        }
+    }
 
     @Lazy
     @Bean(name = "stax-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(StAXComponent.class)
-    public StAXComponent configureStAXComponent(CamelContext camelContext)
-            throws Exception {
+    public StAXComponent configureStAXComponent() throws Exception {
         StAXComponent component = new StAXComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.stax");
-            if (isEnabled(conditionContext, "camel.component.stax.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<StAXComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-stax-starter/src/main/java/org/apache/camel/component/stax/springboot/StAXComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-stax-starter/src/main/java/org/apache/camel/component/stax/springboot/StAXComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-stax-starter/src/main/java/org/apache/camel/component/stax/springboot/StAXComponentConfiguration.java
index e82a27c..522c0eb 100644
--- a/platforms/spring-boot/components-starter/camel-stax-starter/src/main/java/org/apache/camel/component/stax/springboot/StAXComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-stax-starter/src/main/java/org/apache/camel/component/stax/springboot/StAXComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.stax.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -24,8 +26,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.stax")
-public class StAXComponentConfiguration {
+public class StAXComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java
index 08f7262..f4f2887 100644
--- a/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java
@@ -17,49 +17,81 @@
 package org.apache.camel.component.stomp.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.stomp.StompComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(StompComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(StompComponentConfiguration.class)
-public class StompComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        StompComponentConfiguration.class})
+public class StompComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(StompComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<StompComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private StompComponentConfiguration componentConfiguration;
+
+    public StompComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.stomp");
+        }
+    }
 
     @Lazy
     @Bean(name = "stomp-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(StompComponent.class)
-    public StompComponent configureStompComponent(CamelContext camelContext,
-            StompComponentConfiguration configuration) throws Exception {
+    public StompComponent configureStompComponent() throws Exception {
         StompComponent component = new StompComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -82,32 +114,16 @@ public class StompComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.stomp");
-            if (isEnabled(conditionContext, "camel.component.stomp.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<StompComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentConfiguration.java
index 39f7c7a..d6624e4 100644
--- a/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.stomp.springboot;
 
 import javax.annotation.Generated;
 import org.apache.camel.spi.HeaderFilterStrategy;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.apache.camel.util.jsse.SSLContextParameters;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.NestedConfigurationProperty;
@@ -30,7 +31,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.stomp")
-public class StompComponentConfiguration {
+public class StompComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * To use the shared stomp configuration

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-stream-starter/src/main/java/org/apache/camel/component/stream/springboot/StreamComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-stream-starter/src/main/java/org/apache/camel/component/stream/springboot/StreamComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-stream-starter/src/main/java/org/apache/camel/component/stream/springboot/StreamComponentAutoConfiguration.java
index 8b5177d..e1e013d 100644
--- a/platforms/spring-boot/components-starter/camel-stream-starter/src/main/java/org/apache/camel/component/stream/springboot/StreamComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-stream-starter/src/main/java/org/apache/camel/component/stream/springboot/StreamComponentAutoConfiguration.java
@@ -16,68 +16,114 @@
  */
 package org.apache.camel.component.stream.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.stream.StreamComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(StreamComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class StreamComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        StreamComponentConfiguration.class})
+public class StreamComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(StreamComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<StreamComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private StreamComponentConfiguration componentConfiguration;
+
+    public StreamComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.stream");
+        }
+    }
 
     @Lazy
     @Bean(name = "stream-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(StreamComponent.class)
-    public StreamComponent configureStreamComponent(CamelContext camelContext)
-            throws Exception {
+    public StreamComponent configureStreamComponent() throws Exception {
         StreamComponent component = new StreamComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.stream");
-            if (isEnabled(conditionContext, "camel.component.stream.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<StreamComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-stream-starter/src/main/java/org/apache/camel/component/stream/springboot/StreamComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-stream-starter/src/main/java/org/apache/camel/component/stream/springboot/StreamComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-stream-starter/src/main/java/org/apache/camel/component/stream/springboot/StreamComponentConfiguration.java
index eaa4aab..172b000 100644
--- a/platforms/spring-boot/components-starter/camel-stream-starter/src/main/java/org/apache/camel/component/stream/springboot/StreamComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-stream-starter/src/main/java/org/apache/camel/component/stream/springboot/StreamComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.stream.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -24,8 +26,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.stream")
-public class StreamComponentConfiguration {
+public class StreamComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-stringtemplate-starter/src/main/java/org/apache/camel/component/stringtemplate/springboot/StringTemplateComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-stringtemplate-starter/src/main/java/org/apache/camel/component/stringtemplate/springboot/StringTemplateComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-stringtemplate-starter/src/main/java/org/apache/camel/component/stringtemplate/springboot/StringTemplateComponentAutoConfiguration.java
index 9409ab2..03406e3 100644
--- a/platforms/spring-boot/components-starter/camel-stringtemplate-starter/src/main/java/org/apache/camel/component/stringtemplate/springboot/StringTemplateComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-stringtemplate-starter/src/main/java/org/apache/camel/component/stringtemplate/springboot/StringTemplateComponentAutoConfiguration.java
@@ -16,68 +16,117 @@
  */
 package org.apache.camel.component.stringtemplate.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.stringtemplate.StringTemplateComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(StringTemplateComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class StringTemplateComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        StringTemplateComponentConfiguration.class})
+public class StringTemplateComponentAutoConfiguration
+        extends
+            AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(StringTemplateComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<StringTemplateComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private StringTemplateComponentConfiguration componentConfiguration;
+
+    public StringTemplateComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.string-template");
+        }
+    }
 
     @Lazy
     @Bean(name = "string-template-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(StringTemplateComponent.class)
-    public StringTemplateComponent configureStringTemplateComponent(
-            CamelContext camelContext) throws Exception {
+    public StringTemplateComponent configureStringTemplateComponent()
+            throws Exception {
         StringTemplateComponent component = new StringTemplateComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.string-template");
-            if (isEnabled(conditionContext, "camel.component.string-template.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<StringTemplateComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-stringtemplate-starter/src/main/java/org/apache/camel/component/stringtemplate/springboot/StringTemplateComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-stringtemplate-starter/src/main/java/org/apache/camel/component/stringtemplate/springboot/StringTemplateComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-stringtemplate-starter/src/main/java/org/apache/camel/component/stringtemplate/springboot/StringTemplateComponentConfiguration.java
index 3699ee0..a120ff2 100644
--- a/platforms/spring-boot/components-starter/camel-stringtemplate-starter/src/main/java/org/apache/camel/component/stringtemplate/springboot/StringTemplateComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-stringtemplate-starter/src/main/java/org/apache/camel/component/stringtemplate/springboot/StringTemplateComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.stringtemplate.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -23,8 +25,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.string-template")
-public class StringTemplateComponentConfiguration {
+public class StringTemplateComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java
index 0645a74..73b2d49 100644
--- a/platforms/spring-boot/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.syslog.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,72 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.component.syslog.SyslogDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SyslogDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SyslogDataFormatConfiguration.class)
-public class SyslogDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        SyslogDataFormatConfiguration.class})
+public class SyslogDataFormatAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SyslogDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<SyslogDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private SyslogDataFormatConfiguration dataformatConfiguration;
+
+    public SyslogDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.syslog");
+        }
+    }
 
     @Bean(name = "syslog-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SyslogDataFormat.class)
-    public DataFormatFactory configureSyslogDataFormatFactory(
-            final CamelContext camelContext,
-            final SyslogDataFormatConfiguration configuration) {
+    public DataFormatFactory configureSyslogDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 SyslogDataFormat dataformat = new SyslogDataFormat();
@@ -71,7 +104,7 @@ public class SyslogDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +112,19 @@ public class SyslogDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<SyslogDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.syslog");
-            if (isEnabled(conditionContext, "camel.dataformat.syslog.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatConfiguration.java
index 3ef518f..00753a8 100644
--- a/platforms/spring-boot/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.syslog.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.syslog")
-public class SyslogDataFormatConfiguration {
+public class SyslogDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * Whether the data format should set the Content-Type header with the type

Reply | Threaded
Open this post in threaded view
|

[06/38] camel git commit: CAMEL-11291: spring boot starters: allow to hook into auto configuration process

lburgazzoli-2
In reply to this post by lburgazzoli-2
http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-solr-starter/src/main/java/org/apache/camel/component/solr/springboot/SolrComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-solr-starter/src/main/java/org/apache/camel/component/solr/springboot/SolrComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-solr-starter/src/main/java/org/apache/camel/component/solr/springboot/SolrComponentAutoConfiguration.java
index 1afb281..d127561 100644
--- a/platforms/spring-boot/components-starter/camel-solr-starter/src/main/java/org/apache/camel/component/solr/springboot/SolrComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-solr-starter/src/main/java/org/apache/camel/component/solr/springboot/SolrComponentAutoConfiguration.java
@@ -16,68 +16,114 @@
  */
 package org.apache.camel.component.solr.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.solr.SolrComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SolrComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class SolrComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SolrComponentConfiguration.class})
+public class SolrComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SolrComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SolrComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SolrComponentConfiguration componentConfiguration;
+
+    public SolrComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.solr");
+        }
+    }
 
     @Lazy
     @Bean(name = {"solr-component", "solrCloud-component", "solrs-component"})
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SolrComponent.class)
-    public SolrComponent configureSolrComponent(CamelContext camelContext)
-            throws Exception {
+    public SolrComponent configureSolrComponent() throws Exception {
         SolrComponent component = new SolrComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.solr");
-            if (isEnabled(conditionContext, "camel.component.solr.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SolrComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-solr-starter/src/main/java/org/apache/camel/component/solr/springboot/SolrComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-solr-starter/src/main/java/org/apache/camel/component/solr/springboot/SolrComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-solr-starter/src/main/java/org/apache/camel/component/solr/springboot/SolrComponentConfiguration.java
new file mode 100644
index 0000000..0fa29c8
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-solr-starter/src/main/java/org/apache/camel/component/solr/springboot/SolrComponentConfiguration.java
@@ -0,0 +1,49 @@
+/**
+ * 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.component.solr.springboot;
+
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * The solr component allows you to interface with an Apache Lucene Solr server.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "camel.component.solr")
+public class SolrComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
+
+    /**
+     * Whether the component should resolve property placeholders on itself when
+     * starting. Only properties which are of String type can use property
+     * placeholders.
+     */
+    private Boolean resolvePropertyPlaceholders = true;
+
+    public Boolean getResolvePropertyPlaceholders() {
+        return resolvePropertyPlaceholders;
+    }
+
+    public void setResolvePropertyPlaceholders(
+            Boolean resolvePropertyPlaceholders) {
+        this.resolvePropertyPlaceholders = resolvePropertyPlaceholders;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java
index bcfbf96..a1461b3 100644
--- a/platforms/spring-boot/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java
@@ -17,49 +17,81 @@
 package org.apache.camel.component.spark.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.spark.SparkComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SparkComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SparkComponentConfiguration.class)
-public class SparkComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SparkComponentConfiguration.class})
+public class SparkComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SparkComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SparkComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SparkComponentConfiguration componentConfiguration;
+
+    public SparkComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.spark");
+        }
+    }
 
     @Lazy
     @Bean(name = "spark-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SparkComponent.class)
-    public SparkComponent configureSparkComponent(CamelContext camelContext,
-            SparkComponentConfiguration configuration) throws Exception {
+    public SparkComponent configureSparkComponent() throws Exception {
         SparkComponent component = new SparkComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -82,32 +114,16 @@ public class SparkComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.spark");
-            if (isEnabled(conditionContext, "camel.component.spark.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SparkComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentConfiguration.java
index 98a55a4..5d8b74a 100644
--- a/platforms/spring-boot/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.spark.springboot;
 
 import javax.annotation.Generated;
 import org.apache.camel.component.spark.RddCallback;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.apache.spark.api.java.JavaRDDLike;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.NestedConfigurationProperty;
@@ -30,7 +31,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.spark")
-public class SparkComponentConfiguration {
+public class SparkComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * RDD to compute against.

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java
index d80d4d1..522b4a6 100644
--- a/platforms/spring-boot/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java
@@ -17,49 +17,81 @@
 package org.apache.camel.component.splunk.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.splunk.SplunkComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SplunkComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SplunkComponentConfiguration.class)
-public class SplunkComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SplunkComponentConfiguration.class})
+public class SplunkComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SplunkComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SplunkComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SplunkComponentConfiguration componentConfiguration;
+
+    public SplunkComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.splunk");
+        }
+    }
 
     @Lazy
     @Bean(name = "splunk-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SplunkComponent.class)
-    public SplunkComponent configureSplunkComponent(CamelContext camelContext,
-            SplunkComponentConfiguration configuration) throws Exception {
+    public SplunkComponent configureSplunkComponent() throws Exception {
         SplunkComponent component = new SplunkComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -82,32 +114,16 @@ public class SplunkComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.splunk");
-            if (isEnabled(conditionContext, "camel.component.splunk.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SplunkComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentConfiguration.java
index ede27fc..64d19f2 100644
--- a/platforms/spring-boot/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.splunk.springboot;
 
 import javax.annotation.Generated;
 import org.apache.camel.component.splunk.SplunkConfigurationFactory;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
@@ -28,7 +29,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.splunk")
-public class SplunkComponentConfiguration {
+public class SplunkComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * To use the SplunkConfigurationFactory

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java
index fb3fad0..32d5374 100644
--- a/platforms/spring-boot/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java
@@ -17,50 +17,82 @@
 package org.apache.camel.component.spring.batch.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.spring.batch.SpringBatchComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SpringBatchComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SpringBatchComponentConfiguration.class)
-public class SpringBatchComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SpringBatchComponentConfiguration.class})
+public class SpringBatchComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SpringBatchComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SpringBatchComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SpringBatchComponentConfiguration componentConfiguration;
+
+    public SpringBatchComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.spring-batch");
+        }
+    }
 
     @Lazy
     @Bean(name = "spring-batch-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SpringBatchComponent.class)
-    public SpringBatchComponent configureSpringBatchComponent(
-            CamelContext camelContext,
-            SpringBatchComponentConfiguration configuration) throws Exception {
+    public SpringBatchComponent configureSpringBatchComponent()
+            throws Exception {
         SpringBatchComponent component = new SpringBatchComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -83,32 +115,16 @@ public class SpringBatchComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.spring-batch");
-            if (isEnabled(conditionContext, "camel.component.spring-batch.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SpringBatchComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentConfiguration.java
index 85fb173..63fb323 100644
--- a/platforms/spring-boot/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.spring.batch.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.batch.core.configuration.JobRegistry;
 import org.springframework.batch.core.launch.JobLauncher;
 import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -30,7 +31,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.spring-batch")
-public class SpringBatchComponentConfiguration {
+public class SpringBatchComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Explicitly specifies a JobLauncher to be used.

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-integration-starter/src/main/java/org/apache/camel/component/spring/integration/springboot/SpringIntegrationComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-integration-starter/src/main/java/org/apache/camel/component/spring/integration/springboot/SpringIntegrationComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-integration-starter/src/main/java/org/apache/camel/component/spring/integration/springboot/SpringIntegrationComponentAutoConfiguration.java
index c0cc013..80f4933 100644
--- a/platforms/spring-boot/components-starter/camel-spring-integration-starter/src/main/java/org/apache/camel/component/spring/integration/springboot/SpringIntegrationComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-integration-starter/src/main/java/org/apache/camel/component/spring/integration/springboot/SpringIntegrationComponentAutoConfiguration.java
@@ -16,68 +16,117 @@
  */
 package org.apache.camel.component.spring.integration.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.spring.integration.SpringIntegrationComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SpringIntegrationComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class SpringIntegrationComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SpringIntegrationComponentConfiguration.class})
+public class SpringIntegrationComponentAutoConfiguration
+        extends
+            AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SpringIntegrationComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SpringIntegrationComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SpringIntegrationComponentConfiguration componentConfiguration;
+
+    public SpringIntegrationComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.spring-integration");
+        }
+    }
 
     @Lazy
     @Bean(name = "spring-integration-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SpringIntegrationComponent.class)
-    public SpringIntegrationComponent configureSpringIntegrationComponent(
-            CamelContext camelContext) throws Exception {
+    public SpringIntegrationComponent configureSpringIntegrationComponent()
+            throws Exception {
         SpringIntegrationComponent component = new SpringIntegrationComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.spring-integration");
-            if (isEnabled(conditionContext,
-                    "camel.component.spring-integration.", groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SpringIntegrationComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-integration-starter/src/main/java/org/apache/camel/component/spring/integration/springboot/SpringIntegrationComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-integration-starter/src/main/java/org/apache/camel/component/spring/integration/springboot/SpringIntegrationComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-integration-starter/src/main/java/org/apache/camel/component/spring/integration/springboot/SpringIntegrationComponentConfiguration.java
index 0cb2100..da97215 100644
--- a/platforms/spring-boot/components-starter/camel-spring-integration-starter/src/main/java/org/apache/camel/component/spring/integration/springboot/SpringIntegrationComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-integration-starter/src/main/java/org/apache/camel/component/spring/integration/springboot/SpringIntegrationComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.spring.integration.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -23,8 +25,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.spring-integration")
-public class SpringIntegrationComponentConfiguration {
+public class SpringIntegrationComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-ldap-starter/src/main/java/org/apache/camel/component/springldap/springboot/SpringLdapComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-ldap-starter/src/main/java/org/apache/camel/component/springldap/springboot/SpringLdapComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-ldap-starter/src/main/java/org/apache/camel/component/springldap/springboot/SpringLdapComponentAutoConfiguration.java
index 1a032a4..cb2234e 100644
--- a/platforms/spring-boot/components-starter/camel-spring-ldap-starter/src/main/java/org/apache/camel/component/springldap/springboot/SpringLdapComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-ldap-starter/src/main/java/org/apache/camel/component/springldap/springboot/SpringLdapComponentAutoConfiguration.java
@@ -16,68 +16,114 @@
  */
 package org.apache.camel.component.springldap.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.springldap.SpringLdapComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SpringLdapComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class SpringLdapComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SpringLdapComponentConfiguration.class})
+public class SpringLdapComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SpringLdapComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SpringLdapComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SpringLdapComponentConfiguration componentConfiguration;
+
+    public SpringLdapComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.spring-ldap");
+        }
+    }
 
     @Lazy
     @Bean(name = "spring-ldap-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SpringLdapComponent.class)
-    public SpringLdapComponent configureSpringLdapComponent(
-            CamelContext camelContext) throws Exception {
+    public SpringLdapComponent configureSpringLdapComponent() throws Exception {
         SpringLdapComponent component = new SpringLdapComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.spring-ldap");
-            if (isEnabled(conditionContext, "camel.component.spring-ldap.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SpringLdapComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-ldap-starter/src/main/java/org/apache/camel/component/springldap/springboot/SpringLdapComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-ldap-starter/src/main/java/org/apache/camel/component/springldap/springboot/SpringLdapComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-ldap-starter/src/main/java/org/apache/camel/component/springldap/springboot/SpringLdapComponentConfiguration.java
index a248515..16cbd9d 100644
--- a/platforms/spring-boot/components-starter/camel-spring-ldap-starter/src/main/java/org/apache/camel/component/springldap/springboot/SpringLdapComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-ldap-starter/src/main/java/org/apache/camel/component/springldap/springboot/SpringLdapComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.springldap.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -24,8 +26,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.spring-ldap")
-public class SpringLdapComponentConfiguration {
+public class SpringLdapComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-redis-starter/src/main/java/org/apache/camel/component/redis/springboot/RedisComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-redis-starter/src/main/java/org/apache/camel/component/redis/springboot/RedisComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-redis-starter/src/main/java/org/apache/camel/component/redis/springboot/RedisComponentAutoConfiguration.java
index adcdd1c..be5a565 100644
--- a/platforms/spring-boot/components-starter/camel-spring-redis-starter/src/main/java/org/apache/camel/component/redis/springboot/RedisComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-redis-starter/src/main/java/org/apache/camel/component/redis/springboot/RedisComponentAutoConfiguration.java
@@ -16,68 +16,114 @@
  */
 package org.apache.camel.component.redis.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.redis.RedisComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(RedisComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class RedisComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        RedisComponentConfiguration.class})
+public class RedisComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(RedisComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<RedisComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private RedisComponentConfiguration componentConfiguration;
+
+    public RedisComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.spring-redis");
+        }
+    }
 
     @Lazy
     @Bean(name = "spring-redis-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(RedisComponent.class)
-    public RedisComponent configureRedisComponent(CamelContext camelContext)
-            throws Exception {
+    public RedisComponent configureRedisComponent() throws Exception {
         RedisComponent component = new RedisComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.spring-redis");
-            if (isEnabled(conditionContext, "camel.component.spring-redis.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<RedisComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-redis-starter/src/main/java/org/apache/camel/component/redis/springboot/RedisComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-redis-starter/src/main/java/org/apache/camel/component/redis/springboot/RedisComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-redis-starter/src/main/java/org/apache/camel/component/redis/springboot/RedisComponentConfiguration.java
index be86162..417524e 100644
--- a/platforms/spring-boot/components-starter/camel-spring-redis-starter/src/main/java/org/apache/camel/component/redis/springboot/RedisComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-redis-starter/src/main/java/org/apache/camel/component/redis/springboot/RedisComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.redis.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -23,8 +25,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.spring-redis")
-public class RedisComponentConfiguration {
+public class RedisComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java
index 6fea192..30213ed 100644
--- a/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java
@@ -16,68 +16,114 @@
  */
 package org.apache.camel.component.event.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.event.EventComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(EventComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class EventComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        EventComponentConfiguration.class})
+public class EventComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(EventComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<EventComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private EventComponentConfiguration componentConfiguration;
+
+    public EventComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.spring-event");
+        }
+    }
 
     @Lazy
     @Bean(name = "spring-event-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(EventComponent.class)
-    public EventComponent configureEventComponent(CamelContext camelContext)
-            throws Exception {
+    public EventComponent configureEventComponent() throws Exception {
         EventComponent component = new EventComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.spring-event");
-            if (isEnabled(conditionContext, "camel.component.spring-event.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<EventComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentConfiguration.java
index 0628cb5..6bde388 100644
--- a/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentConfiguration.java
@@ -16,36 +16,28 @@
  */
 package org.apache.camel.component.event.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.ApplicationContext;
 
 /**
  * The spring-event component allows to listen for Spring Application Events.
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.spring-event")
-public class EventComponentConfiguration {
+public class EventComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
-     * The Spring ApplicationContext
-     */
-    private ApplicationContext applicationContext;
-    /**
      * Whether the component should resolve property placeholders on itself when
      * starting. Only properties which are of String type can use property
      * placeholders.
      */
     private Boolean resolvePropertyPlaceholders = true;
 
-    public ApplicationContext getApplicationContext() {
-        return applicationContext;
-    }
-
-    public void setApplicationContext(ApplicationContext applicationContext) {
-        this.applicationContext = applicationContext;
-    }
-
     public Boolean getResolvePropertyPlaceholders() {
         return resolvePropertyPlaceholders;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
index eb7e21f..0bdd5a1 100644
--- a/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
@@ -17,45 +17,78 @@
 package org.apache.camel.language.spel.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.language.spel.SpelLanguage;
+import org.apache.camel.spi.LanguageCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.LanguageConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Scope;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SpelLanguageAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SpelLanguageConfiguration.class)
-public class SpelLanguageAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({LanguageConfigurationProperties.class,
+        SpelLanguageConfiguration.class})
+public class SpelLanguageAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SpelLanguageAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<LanguageCustomizer<SpelLanguage>> customizers;
+    @Autowired
+    private LanguageConfigurationProperties globalConfiguration;
+    @Autowired
+    private SpelLanguageConfiguration languageConfiguration;
+
+    public SpelLanguageAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.spel");
+        }
+    }
 
     @Bean(name = "spel-language")
     @Scope("prototype")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SpelLanguage.class)
-    public SpelLanguage configureSpelLanguage(CamelContext camelContext,
-            SpelLanguageConfiguration configuration) throws Exception {
+    public SpelLanguage configureSpelLanguage() throws Exception {
         SpelLanguage language = new SpelLanguage();
         if (CamelContextAware.class.isAssignableFrom(SpelLanguage.class)) {
             CamelContextAware contextAware = CamelContextAware.class
@@ -65,36 +98,20 @@ public class SpelLanguageAutoConfiguration {
             }
         }
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(languageConfiguration, parameters,
+                null, false);
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), language, parameters);
-        return language;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.language.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.language.spel");
-            if (isEnabled(conditionContext, "camel.language.spel.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && languageConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (LanguageCustomizer<SpelLanguage> configurer : customizers) {
+                LOGGER.debug("Configure language {}, with configurer {}",
+                        language, configurer);
+                configurer.customize(language);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return language;
     }
 }
\ No newline at end of file

Reply | Threaded
Open this post in threaded view
|

[07/38] camel git commit: CAMEL-11291: spring boot starters: allow to hook into auto configuration process

lburgazzoli-2
In reply to this post by lburgazzoli-2
http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-sip-starter/src/main/java/org/apache/camel/component/sip/springboot/SipComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-sip-starter/src/main/java/org/apache/camel/component/sip/springboot/SipComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-sip-starter/src/main/java/org/apache/camel/component/sip/springboot/SipComponentAutoConfiguration.java
index 9a3d7a6..a766692 100644
--- a/platforms/spring-boot/components-starter/camel-sip-starter/src/main/java/org/apache/camel/component/sip/springboot/SipComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-sip-starter/src/main/java/org/apache/camel/component/sip/springboot/SipComponentAutoConfiguration.java
@@ -16,68 +16,114 @@
  */
 package org.apache.camel.component.sip.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.sip.SipComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SipComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class SipComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SipComponentConfiguration.class})
+public class SipComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SipComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SipComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SipComponentConfiguration componentConfiguration;
+
+    public SipComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.sip");
+        }
+    }
 
     @Lazy
     @Bean(name = {"sip-component", "sips-component"})
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SipComponent.class)
-    public SipComponent configureSipComponent(CamelContext camelContext)
-            throws Exception {
+    public SipComponent configureSipComponent() throws Exception {
         SipComponent component = new SipComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.sip");
-            if (isEnabled(conditionContext, "camel.component.sip.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SipComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-sip-starter/src/main/java/org/apache/camel/component/sip/springboot/SipComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-sip-starter/src/main/java/org/apache/camel/component/sip/springboot/SipComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-sip-starter/src/main/java/org/apache/camel/component/sip/springboot/SipComponentConfiguration.java
index 2b8c16a..550a419 100644
--- a/platforms/spring-boot/components-starter/camel-sip-starter/src/main/java/org/apache/camel/component/sip/springboot/SipComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-sip-starter/src/main/java/org/apache/camel/component/sip/springboot/SipComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.sip.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -24,8 +26,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.sip")
-public class SipComponentConfiguration {
+public class SipComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java
index b7bc6fa..068b2c0 100644
--- a/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java
@@ -17,50 +17,81 @@
 package org.apache.camel.component.sjms.batch.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.sjms.batch.SjmsBatchComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SjmsBatchComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SjmsBatchComponentConfiguration.class)
-public class SjmsBatchComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SjmsBatchComponentConfiguration.class})
+public class SjmsBatchComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SjmsBatchComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SjmsBatchComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SjmsBatchComponentConfiguration componentConfiguration;
+
+    public SjmsBatchComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.sjms-batch");
+        }
+    }
 
     @Lazy
     @Bean(name = "sjms-batch-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SjmsBatchComponent.class)
-    public SjmsBatchComponent configureSjmsBatchComponent(
-            CamelContext camelContext,
-            SjmsBatchComponentConfiguration configuration) throws Exception {
+    public SjmsBatchComponent configureSjmsBatchComponent() throws Exception {
         SjmsBatchComponent component = new SjmsBatchComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -83,32 +114,16 @@ public class SjmsBatchComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.sjms-batch");
-            if (isEnabled(conditionContext, "camel.component.sjms-batch.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SjmsBatchComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentConfiguration.java
index 90ad059..21c3732 100644
--- a/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentConfiguration.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.sjms.batch.springboot;
 import javax.annotation.Generated;
 import javax.jms.ConnectionFactory;
 import org.apache.camel.spi.HeaderFilterStrategy;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
@@ -30,7 +31,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.sjms-batch")
-public class SjmsBatchComponentConfiguration {
+public class SjmsBatchComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * A ConnectionFactory is required to enable the SjmsBatchComponent.

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java
index 30022fc..096c823 100644
--- a/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java
@@ -17,49 +17,81 @@
 package org.apache.camel.component.sjms.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.sjms.SjmsComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SjmsComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SjmsComponentConfiguration.class)
-public class SjmsComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SjmsComponentConfiguration.class})
+public class SjmsComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SjmsComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SjmsComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SjmsComponentConfiguration componentConfiguration;
+
+    public SjmsComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.sjms");
+        }
+    }
 
     @Lazy
     @Bean(name = "sjms-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SjmsComponent.class)
-    public SjmsComponent configureSjmsComponent(CamelContext camelContext,
-            SjmsComponentConfiguration configuration) throws Exception {
+    public SjmsComponent configureSjmsComponent() throws Exception {
         SjmsComponent component = new SjmsComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -82,32 +114,16 @@ public class SjmsComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.sjms");
-            if (isEnabled(conditionContext, "camel.component.sjms.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SjmsComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentConfiguration.java
index 6e8bdce..30572bf 100644
--- a/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentConfiguration.java
@@ -24,6 +24,7 @@ import org.apache.camel.component.sjms.jms.DestinationCreationStrategy;
 import org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy;
 import org.apache.camel.component.sjms.jms.MessageCreatedStrategy;
 import org.apache.camel.spi.HeaderFilterStrategy;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
@@ -35,7 +36,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.sjms")
-public class SjmsComponentConfiguration {
+public class SjmsComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * A ConnectionFactory is required to enable the SjmsComponent. It can be

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-sjms2-starter/src/main/java/org/apache/camel/component/sjms2/springboot/Sjms2ComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-sjms2-starter/src/main/java/org/apache/camel/component/sjms2/springboot/Sjms2ComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-sjms2-starter/src/main/java/org/apache/camel/component/sjms2/springboot/Sjms2ComponentAutoConfiguration.java
index fa2a166..3fcc0ed 100644
--- a/platforms/spring-boot/components-starter/camel-sjms2-starter/src/main/java/org/apache/camel/component/sjms2/springboot/Sjms2ComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-sjms2-starter/src/main/java/org/apache/camel/component/sjms2/springboot/Sjms2ComponentAutoConfiguration.java
@@ -17,49 +17,81 @@
 package org.apache.camel.component.sjms2.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.sjms2.Sjms2Component;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(Sjms2ComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(Sjms2ComponentConfiguration.class)
-public class Sjms2ComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        Sjms2ComponentConfiguration.class})
+public class Sjms2ComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(Sjms2ComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<Sjms2Component>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private Sjms2ComponentConfiguration componentConfiguration;
+
+    public Sjms2ComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.sjms2");
+        }
+    }
 
     @Lazy
     @Bean(name = "sjms2-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(Sjms2Component.class)
-    public Sjms2Component configureSjms2Component(CamelContext camelContext,
-            Sjms2ComponentConfiguration configuration) throws Exception {
+    public Sjms2Component configureSjms2Component() throws Exception {
         Sjms2Component component = new Sjms2Component();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -82,32 +114,16 @@ public class Sjms2ComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.sjms2");
-            if (isEnabled(conditionContext, "camel.component.sjms2.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<Sjms2Component> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-sjms2-starter/src/main/java/org/apache/camel/component/sjms2/springboot/Sjms2ComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-sjms2-starter/src/main/java/org/apache/camel/component/sjms2/springboot/Sjms2ComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-sjms2-starter/src/main/java/org/apache/camel/component/sjms2/springboot/Sjms2ComponentConfiguration.java
index e5f8ad5..e15249a 100644
--- a/platforms/spring-boot/components-starter/camel-sjms2-starter/src/main/java/org/apache/camel/component/sjms2/springboot/Sjms2ComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-sjms2-starter/src/main/java/org/apache/camel/component/sjms2/springboot/Sjms2ComponentConfiguration.java
@@ -25,6 +25,7 @@ import org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy;
 import org.apache.camel.component.sjms.jms.MessageCreatedStrategy;
 import org.apache.camel.component.sjms.taskmanager.TimedTaskManager;
 import org.apache.camel.spi.HeaderFilterStrategy;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
@@ -36,7 +37,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.sjms2")
-public class Sjms2ComponentConfiguration {
+public class Sjms2ComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * A ConnectionFactory is required to enable the SjmsComponent. It can be

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java
index 3a09bd4..2cf5851 100644
--- a/platforms/spring-boot/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java
@@ -17,49 +17,81 @@
 package org.apache.camel.component.slack.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.slack.SlackComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SlackComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SlackComponentConfiguration.class)
-public class SlackComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SlackComponentConfiguration.class})
+public class SlackComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SlackComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SlackComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SlackComponentConfiguration componentConfiguration;
+
+    public SlackComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.slack");
+        }
+    }
 
     @Lazy
     @Bean(name = "slack-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SlackComponent.class)
-    public SlackComponent configureSlackComponent(CamelContext camelContext,
-            SlackComponentConfiguration configuration) throws Exception {
+    public SlackComponent configureSlackComponent() throws Exception {
         SlackComponent component = new SlackComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -82,32 +114,16 @@ public class SlackComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.slack");
-            if (isEnabled(conditionContext, "camel.component.slack.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SlackComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentConfiguration.java
index 8e5ce18..52292ed 100644
--- a/platforms/spring-boot/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.slack.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.slack")
-public class SlackComponentConfiguration {
+public class SlackComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * The incoming webhook URL

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java
index 3153fc9..3b69911 100644
--- a/platforms/spring-boot/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java
@@ -17,49 +17,81 @@
 package org.apache.camel.component.smpp.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.smpp.SmppComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SmppComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SmppComponentConfiguration.class)
-public class SmppComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SmppComponentConfiguration.class})
+public class SmppComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SmppComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SmppComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SmppComponentConfiguration componentConfiguration;
+
+    public SmppComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.smpp");
+        }
+    }
 
     @Lazy
     @Bean(name = {"smpp-component", "smpps-component"})
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SmppComponent.class)
-    public SmppComponent configureSmppComponent(CamelContext camelContext,
-            SmppComponentConfiguration configuration) throws Exception {
+    public SmppComponent configureSmppComponent() throws Exception {
         SmppComponent component = new SmppComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -82,32 +114,16 @@ public class SmppComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.smpp");
-            if (isEnabled(conditionContext, "camel.component.smpp.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SmppComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentConfiguration.java
index 285e097..0ac055b 100644
--- a/platforms/spring-boot/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentConfiguration.java
@@ -20,6 +20,7 @@ import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.component.smpp.SmppComponent;
 import org.apache.camel.component.smpp.SmppSplittingPolicy;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.jsmpp.session.SessionStateListener;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
@@ -30,7 +31,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.smpp")
-public class SmppComponentConfiguration {
+public class SmppComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * To use the shared SmppConfiguration as configuration.

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java
index 8e990fc..02dff39 100644
--- a/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.snakeyaml.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,72 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.component.snakeyaml.SnakeYAMLDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SnakeYAMLDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SnakeYAMLDataFormatConfiguration.class)
-public class SnakeYAMLDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        SnakeYAMLDataFormatConfiguration.class})
+public class SnakeYAMLDataFormatAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SnakeYAMLDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<SnakeYAMLDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private SnakeYAMLDataFormatConfiguration dataformatConfiguration;
+
+    public SnakeYAMLDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.yaml-snakeyaml");
+        }
+    }
 
     @Bean(name = "yaml-snakeyaml-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SnakeYAMLDataFormat.class)
-    public DataFormatFactory configureSnakeYAMLDataFormatFactory(
-            final CamelContext camelContext,
-            final SnakeYAMLDataFormatConfiguration configuration) {
+    public DataFormatFactory configureSnakeYAMLDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 SnakeYAMLDataFormat dataformat = new SnakeYAMLDataFormat();
@@ -71,7 +104,7 @@ public class SnakeYAMLDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +112,19 @@ public class SnakeYAMLDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<SnakeYAMLDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.yaml-snakeyaml");
-            if (isEnabled(conditionContext, "camel.dataformat.yaml-snakeyaml.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatConfiguration.java
index e0e1d90..0fd6fba 100644
--- a/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatConfiguration.java
@@ -21,6 +21,7 @@ import javax.annotation.Generated;
 import org.apache.camel.component.snakeyaml.SnakeYAMLDataFormat;
 import org.apache.camel.model.dataformat.YAMLLibrary;
 import org.apache.camel.model.dataformat.YAMLTypeFilterDefinition;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -30,7 +31,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.yaml-snakeyaml")
-public class SnakeYAMLDataFormatConfiguration {
+public class SnakeYAMLDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * Which yaml library to use. By default it is SnakeYAML

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-snmp-starter/src/main/java/org/apache/camel/component/snmp/springboot/SnmpComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-snmp-starter/src/main/java/org/apache/camel/component/snmp/springboot/SnmpComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-snmp-starter/src/main/java/org/apache/camel/component/snmp/springboot/SnmpComponentAutoConfiguration.java
index 82cd4cb..238a82c 100644
--- a/platforms/spring-boot/components-starter/camel-snmp-starter/src/main/java/org/apache/camel/component/snmp/springboot/SnmpComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-snmp-starter/src/main/java/org/apache/camel/component/snmp/springboot/SnmpComponentAutoConfiguration.java
@@ -16,68 +16,114 @@
  */
 package org.apache.camel.component.snmp.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.snmp.SnmpComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SnmpComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class SnmpComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SnmpComponentConfiguration.class})
+public class SnmpComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SnmpComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SnmpComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SnmpComponentConfiguration componentConfiguration;
+
+    public SnmpComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.snmp");
+        }
+    }
 
     @Lazy
     @Bean(name = "snmp-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SnmpComponent.class)
-    public SnmpComponent configureSnmpComponent(CamelContext camelContext)
-            throws Exception {
+    public SnmpComponent configureSnmpComponent() throws Exception {
         SnmpComponent component = new SnmpComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.snmp");
-            if (isEnabled(conditionContext, "camel.component.snmp.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SnmpComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-snmp-starter/src/main/java/org/apache/camel/component/snmp/springboot/SnmpComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-snmp-starter/src/main/java/org/apache/camel/component/snmp/springboot/SnmpComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-snmp-starter/src/main/java/org/apache/camel/component/snmp/springboot/SnmpComponentConfiguration.java
index 09aa366..d890f3f 100644
--- a/platforms/spring-boot/components-starter/camel-snmp-starter/src/main/java/org/apache/camel/component/snmp/springboot/SnmpComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-snmp-starter/src/main/java/org/apache/camel/component/snmp/springboot/SnmpComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.snmp.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -24,8 +26,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.snmp")
-public class SnmpComponentConfiguration {
+public class SnmpComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java
index 6b575e0..60034ab 100644
--- a/platforms/spring-boot/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.soap.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
@@ -24,40 +25,72 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.dataformat.soap.SoapJaxbDataFormat;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
 import org.apache.camel.spi.DataFormatFactory;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SoapJaxbDataFormatAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(SoapJaxbDataFormatConfiguration.class)
-public class SoapJaxbDataFormatAutoConfiguration {
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,
+        SoapJaxbDataFormatConfiguration.class})
+public class SoapJaxbDataFormatAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SoapJaxbDataFormatAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<DataFormatCustomizer<SoapJaxbDataFormat>> customizers;
+    @Autowired
+    private DataFormatConfigurationProperties globalConfiguration;
+    @Autowired
+    private SoapJaxbDataFormatConfiguration dataformatConfiguration;
+
+    public SoapJaxbDataFormatAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.dataformat", "camel.dataformat.soapjaxb");
+        }
+    }
 
     @Bean(name = "soapjaxb-dataformat-factory")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SoapJaxbDataFormat.class)
-    public DataFormatFactory configureSoapJaxbDataFormatFactory(
-            final CamelContext camelContext,
-            final SoapJaxbDataFormatConfiguration configuration) {
+    public DataFormatFactory configureSoapJaxbDataFormatFactory()
+            throws Exception {
         return new DataFormatFactory() {
             public DataFormat newInstance() {
                 SoapJaxbDataFormat dataformat = new SoapJaxbDataFormat();
@@ -71,7 +104,7 @@ public class SoapJaxbDataFormatAutoConfiguration {
                 }
                 try {
                     Map<String, Object> parameters = new HashMap<>();
-                    IntrospectionSupport.getProperties(configuration,
+                    IntrospectionSupport.getProperties(dataformatConfiguration,
                             parameters, null, false);
                     IntrospectionSupport.setProperties(camelContext,
                             camelContext.getTypeConverter(), dataformat,
@@ -79,34 +112,19 @@ public class SoapJaxbDataFormatAutoConfiguration {
                 } catch (Exception e) {
                     throw new RuntimeCamelException(e);
                 }
+                boolean useConfigurers = globalConfiguration.getConfigurer()
+                        .isEnabled()
+                        && dataformatConfiguration.getConfigurer().isEnabled();
+                if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+                    for (DataFormatCustomizer<SoapJaxbDataFormat> configurer : customizers) {
+                        LOGGER.debug(
+                                "Configure dataformat {}, with configurer {}",
+                                dataformat, configurer);
+                        configurer.customize(dataformat);
+                    }
+                }
                 return dataformat;
             }
         };
     }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.dataformat.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.dataformat.soapjaxb");
-            if (isEnabled(conditionContext, "camel.dataformat.soapjaxb.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
-            }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatConfiguration.java
index a1769ac..4b0c272 100644
--- a/platforms/spring-boot/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.dataformat.soap.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.dataformat.soapjaxb")
-public class SoapJaxbDataFormatConfiguration {
+public class SoapJaxbDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
 
     /**
      * Package name where your JAXB classes are located.

Reply | Threaded
Open this post in threaded view
|

[08/38] camel git commit: CAMEL-11291: spring boot starters: allow to hook into auto configuration process

lburgazzoli-2
In reply to this post by lburgazzoli-2
http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-sap-netweaver-starter/src/main/java/org/apache/camel/component/sap/netweaver/springboot/NetWeaverComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-sap-netweaver-starter/src/main/java/org/apache/camel/component/sap/netweaver/springboot/NetWeaverComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-sap-netweaver-starter/src/main/java/org/apache/camel/component/sap/netweaver/springboot/NetWeaverComponentConfiguration.java
index bf7acc2..76c577f 100644
--- a/platforms/spring-boot/components-starter/camel-sap-netweaver-starter/src/main/java/org/apache/camel/component/sap/netweaver/springboot/NetWeaverComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-sap-netweaver-starter/src/main/java/org/apache/camel/component/sap/netweaver/springboot/NetWeaverComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.sap.netweaver.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -24,8 +26,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.sap-netweaver")
-public class NetWeaverComponentConfiguration {
+public class NetWeaverComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java
index 2542c9b..0ad9896 100644
--- a/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java
@@ -17,49 +17,81 @@
 package org.apache.camel.component.xquery.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.xquery.XQueryComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(XQueryComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(XQueryComponentConfiguration.class)
-public class XQueryComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        XQueryComponentConfiguration.class})
+public class XQueryComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(XQueryComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<XQueryComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private XQueryComponentConfiguration componentConfiguration;
+
+    public XQueryComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.xquery");
+        }
+    }
 
     @Lazy
     @Bean(name = "xquery-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(XQueryComponent.class)
-    public XQueryComponent configureXQueryComponent(CamelContext camelContext,
-            XQueryComponentConfiguration configuration) throws Exception {
+    public XQueryComponent configureXQueryComponent() throws Exception {
         XQueryComponent component = new XQueryComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -82,32 +114,16 @@ public class XQueryComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.xquery");
-            if (isEnabled(conditionContext, "camel.component.xquery.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<XQueryComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentConfiguration.java
index 69b7644..ac5bde8 100644
--- a/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentConfiguration.java
@@ -20,6 +20,7 @@ import java.util.Map;
 import javax.annotation.Generated;
 import net.sf.saxon.Configuration;
 import net.sf.saxon.lib.ModuleURIResolver;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
@@ -30,7 +31,9 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.xquery")
-public class XQueryComponentConfiguration {
+public class XQueryComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * To use the custom ModuleURIResolver

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
index c970cf3..00e7137 100644
--- a/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
@@ -17,45 +17,78 @@
 package org.apache.camel.language.xquery.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.language.xquery.XQueryLanguage;
+import org.apache.camel.spi.LanguageCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.LanguageConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Scope;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(XQueryLanguageAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(XQueryLanguageConfiguration.class)
-public class XQueryLanguageAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({LanguageConfigurationProperties.class,
+        XQueryLanguageConfiguration.class})
+public class XQueryLanguageAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(XQueryLanguageAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<LanguageCustomizer<XQueryLanguage>> customizers;
+    @Autowired
+    private LanguageConfigurationProperties globalConfiguration;
+    @Autowired
+    private XQueryLanguageConfiguration languageConfiguration;
+
+    public XQueryLanguageAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.xquery");
+        }
+    }
 
     @Bean(name = "xquery-language")
     @Scope("prototype")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(XQueryLanguage.class)
-    public XQueryLanguage configureXQueryLanguage(CamelContext camelContext,
-            XQueryLanguageConfiguration configuration) throws Exception {
+    public XQueryLanguage configureXQueryLanguage() throws Exception {
         XQueryLanguage language = new XQueryLanguage();
         if (CamelContextAware.class.isAssignableFrom(XQueryLanguage.class)) {
             CamelContextAware contextAware = CamelContextAware.class
@@ -65,36 +98,20 @@ public class XQueryLanguageAutoConfiguration {
             }
         }
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(languageConfiguration, parameters,
+                null, false);
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), language, parameters);
-        return language;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.language.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.language.xquery");
-            if (isEnabled(conditionContext, "camel.language.xquery.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && languageConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (LanguageCustomizer<XQueryLanguage> configurer : customizers) {
+                LOGGER.debug("Configure language {}, with configurer {}",
+                        language, configurer);
+                configurer.customize(language);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return language;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java b/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java
index d479273..9112e66 100644
--- a/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.language.xquery.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.LanguageConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.language.xquery")
-public class XQueryLanguageConfiguration {
+public class XQueryLanguageConfiguration
+        extends
+            LanguageConfigurationPropertiesCommon {
 
     /**
      * Sets the class name of the result type (type from output) The default

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-schematron-starter/src/main/java/org/apache/camel/component/schematron/springboot/SchematronComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-schematron-starter/src/main/java/org/apache/camel/component/schematron/springboot/SchematronComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-schematron-starter/src/main/java/org/apache/camel/component/schematron/springboot/SchematronComponentAutoConfiguration.java
index 6b5e42f..3a6641c 100644
--- a/platforms/spring-boot/components-starter/camel-schematron-starter/src/main/java/org/apache/camel/component/schematron/springboot/SchematronComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-schematron-starter/src/main/java/org/apache/camel/component/schematron/springboot/SchematronComponentAutoConfiguration.java
@@ -16,68 +16,114 @@
  */
 package org.apache.camel.component.schematron.springboot;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.schematron.SchematronComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(SchematronComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-public class SchematronComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        SchematronComponentConfiguration.class})
+public class SchematronComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(SchematronComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<SchematronComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private SchematronComponentConfiguration componentConfiguration;
+
+    public SchematronComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.schematron");
+        }
+    }
 
     @Lazy
     @Bean(name = "schematron-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(SchematronComponent.class)
-    public SchematronComponent configureSchematronComponent(
-            CamelContext camelContext) throws Exception {
+    public SchematronComponent configureSchematronComponent() throws Exception {
         SchematronComponent component = new SchematronComponent();
         component.setCamelContext(camelContext);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.schematron");
-            if (isEnabled(conditionContext, "camel.component.schematron.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(componentConfiguration, 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) {
+                }
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
         }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
+        IntrospectionSupport.setProperties(camelContext,
+                camelContext.getTypeConverter(), component, parameters);
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && componentConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<SchematronComponent> configurer : customizers) {
+                LOGGER.debug("Configure component {}, with configurer {}",
+                        component, configurer);
+                configurer.customize(component);
+            }
         }
+        return component;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-schematron-starter/src/main/java/org/apache/camel/component/schematron/springboot/SchematronComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-schematron-starter/src/main/java/org/apache/camel/component/schematron/springboot/SchematronComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-schematron-starter/src/main/java/org/apache/camel/component/schematron/springboot/SchematronComponentConfiguration.java
index 5dfa627..52f3f7b 100644
--- a/platforms/spring-boot/components-starter/camel-schematron-starter/src/main/java/org/apache/camel/component/schematron/springboot/SchematronComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-schematron-starter/src/main/java/org/apache/camel/component/schematron/springboot/SchematronComponentConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.schematron.springboot;
 
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -23,8 +25,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  *
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.schematron")
-public class SchematronComponentConfiguration {
+public class SchematronComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
 
     /**
      * Whether the component should resolve property placeholders on itself when

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
index 7a2e636..3885b92 100644
--- a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
@@ -17,46 +17,78 @@
 package org.apache.camel.builder.script.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.builder.script.JavaScriptLanguage;
+import org.apache.camel.spi.LanguageCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.LanguageConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Scope;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(JavaScriptLanguageAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(JavaScriptLanguageConfiguration.class)
-public class JavaScriptLanguageAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({LanguageConfigurationProperties.class,
+        JavaScriptLanguageConfiguration.class})
+public class JavaScriptLanguageAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(JavaScriptLanguageAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<LanguageCustomizer<JavaScriptLanguage>> customizers;
+    @Autowired
+    private LanguageConfigurationProperties globalConfiguration;
+    @Autowired
+    private JavaScriptLanguageConfiguration languageConfiguration;
+
+    public JavaScriptLanguageAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.javascript");
+        }
+    }
 
     @Bean(name = "javaScript-language")
     @Scope("prototype")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(JavaScriptLanguage.class)
-    public JavaScriptLanguage configureJavaScriptLanguage(
-            CamelContext camelContext,
-            JavaScriptLanguageConfiguration configuration) throws Exception {
+    public JavaScriptLanguage configureJavaScriptLanguage() throws Exception {
         JavaScriptLanguage language = new JavaScriptLanguage();
         if (CamelContextAware.class.isAssignableFrom(JavaScriptLanguage.class)) {
             CamelContextAware contextAware = CamelContextAware.class
@@ -66,36 +98,20 @@ public class JavaScriptLanguageAutoConfiguration {
             }
         }
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(languageConfiguration, parameters,
+                null, false);
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), language, parameters);
-        return language;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.language.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.language.javascript");
-            if (isEnabled(conditionContext, "camel.language.javascript.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && languageConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (LanguageCustomizer<JavaScriptLanguage> configurer : customizers) {
+                LOGGER.debug("Configure language {}, with configurer {}",
+                        language, configurer);
+                configurer.customize(language);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return language;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageConfiguration.java b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageConfiguration.java
index bbd9a57..981f688 100644
--- a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.builder.script.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.LanguageConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.language.javascript")
-public class JavaScriptLanguageConfiguration {
+public class JavaScriptLanguageConfiguration
+        extends
+            LanguageConfigurationPropertiesCommon {
 
     /**
      * Whether to trim the value to remove leading and trailing whitespaces and

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
index 23202cd..2105527 100644
--- a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
@@ -17,45 +17,78 @@
 package org.apache.camel.builder.script.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.builder.script.PhpLanguage;
+import org.apache.camel.spi.LanguageCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.LanguageConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Scope;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(PhpLanguageAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(PhpLanguageConfiguration.class)
-public class PhpLanguageAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({LanguageConfigurationProperties.class,
+        PhpLanguageConfiguration.class})
+public class PhpLanguageAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(PhpLanguageAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<LanguageCustomizer<PhpLanguage>> customizers;
+    @Autowired
+    private LanguageConfigurationProperties globalConfiguration;
+    @Autowired
+    private PhpLanguageConfiguration languageConfiguration;
+
+    public PhpLanguageAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.php");
+        }
+    }
 
     @Bean(name = "php-language")
     @Scope("prototype")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(PhpLanguage.class)
-    public PhpLanguage configurePhpLanguage(CamelContext camelContext,
-            PhpLanguageConfiguration configuration) throws Exception {
+    public PhpLanguage configurePhpLanguage() throws Exception {
         PhpLanguage language = new PhpLanguage();
         if (CamelContextAware.class.isAssignableFrom(PhpLanguage.class)) {
             CamelContextAware contextAware = CamelContextAware.class
@@ -65,35 +98,20 @@ public class PhpLanguageAutoConfiguration {
             }
         }
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(languageConfiguration, parameters,
+                null, false);
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), language, parameters);
-        return language;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.language.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.language.php");
-            if (isEnabled(conditionContext, "camel.language.php.", groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && languageConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (LanguageCustomizer<PhpLanguage> configurer : customizers) {
+                LOGGER.debug("Configure language {}, with configurer {}",
+                        language, configurer);
+                configurer.customize(language);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return language;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageConfiguration.java b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageConfiguration.java
index 4d6641b..07efa74 100644
--- a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.builder.script.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.LanguageConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.language.php")
-public class PhpLanguageConfiguration {
+public class PhpLanguageConfiguration
+        extends
+            LanguageConfigurationPropertiesCommon {
 
     /**
      * Whether to trim the value to remove leading and trailing whitespaces and

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
index 6cac0e9..fa09d1e 100644
--- a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
@@ -17,45 +17,78 @@
 package org.apache.camel.builder.script.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.builder.script.PythonLanguage;
+import org.apache.camel.spi.LanguageCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.LanguageConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Scope;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(PythonLanguageAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(PythonLanguageConfiguration.class)
-public class PythonLanguageAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({LanguageConfigurationProperties.class,
+        PythonLanguageConfiguration.class})
+public class PythonLanguageAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(PythonLanguageAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<LanguageCustomizer<PythonLanguage>> customizers;
+    @Autowired
+    private LanguageConfigurationProperties globalConfiguration;
+    @Autowired
+    private PythonLanguageConfiguration languageConfiguration;
+
+    public PythonLanguageAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.python");
+        }
+    }
 
     @Bean(name = "python-language")
     @Scope("prototype")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(PythonLanguage.class)
-    public PythonLanguage configurePythonLanguage(CamelContext camelContext,
-            PythonLanguageConfiguration configuration) throws Exception {
+    public PythonLanguage configurePythonLanguage() throws Exception {
         PythonLanguage language = new PythonLanguage();
         if (CamelContextAware.class.isAssignableFrom(PythonLanguage.class)) {
             CamelContextAware contextAware = CamelContextAware.class
@@ -65,36 +98,20 @@ public class PythonLanguageAutoConfiguration {
             }
         }
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(languageConfiguration, parameters,
+                null, false);
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), language, parameters);
-        return language;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.language.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.language.python");
-            if (isEnabled(conditionContext, "camel.language.python.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && languageConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (LanguageCustomizer<PythonLanguage> configurer : customizers) {
+                LOGGER.debug("Configure language {}, with configurer {}",
+                        language, configurer);
+                configurer.customize(language);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return language;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageConfiguration.java b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageConfiguration.java
index 214f23a..2a5b536 100644
--- a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.builder.script.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.LanguageConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.language.python")
-public class PythonLanguageConfiguration {
+public class PythonLanguageConfiguration
+        extends
+            LanguageConfigurationPropertiesCommon {
 
     /**
      * Whether to trim the value to remove leading and trailing whitespaces and

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
index c480b3b..8663695 100644
--- a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
@@ -17,45 +17,78 @@
 package org.apache.camel.builder.script.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.builder.script.RubyLanguage;
+import org.apache.camel.spi.LanguageCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.LanguageConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Scope;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(RubyLanguageAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(RubyLanguageConfiguration.class)
-public class RubyLanguageAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({LanguageConfigurationProperties.class,
+        RubyLanguageConfiguration.class})
+public class RubyLanguageAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(RubyLanguageAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<LanguageCustomizer<RubyLanguage>> customizers;
+    @Autowired
+    private LanguageConfigurationProperties globalConfiguration;
+    @Autowired
+    private RubyLanguageConfiguration languageConfiguration;
+
+    public RubyLanguageAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.ruby");
+        }
+    }
 
     @Bean(name = "ruby-language")
     @Scope("prototype")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(RubyLanguage.class)
-    public RubyLanguage configureRubyLanguage(CamelContext camelContext,
-            RubyLanguageConfiguration configuration) throws Exception {
+    public RubyLanguage configureRubyLanguage() throws Exception {
         RubyLanguage language = new RubyLanguage();
         if (CamelContextAware.class.isAssignableFrom(RubyLanguage.class)) {
             CamelContextAware contextAware = CamelContextAware.class
@@ -65,36 +98,20 @@ public class RubyLanguageAutoConfiguration {
             }
         }
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(languageConfiguration, parameters,
+                null, false);
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), language, parameters);
-        return language;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.language.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.language.ruby");
-            if (isEnabled(conditionContext, "camel.language.ruby.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));
+        boolean useConfigurers = globalConfiguration.getConfigurer()
+                .isEnabled()
+                && languageConfiguration.getConfigurer().isEnabled();
+        if (useConfigurers && ObjectHelper.isNotEmpty(customizers)) {
+            for (LanguageCustomizer<RubyLanguage> configurer : customizers) {
+                LOGGER.debug("Configure language {}, with configurer {}",
+                        language, configurer);
+                configurer.customize(language);
             }
-            return ConditionOutcome.noMatch(message.because("not enabled"));
-        }
-
-        private boolean isEnabled(
-                org.springframework.context.annotation.ConditionContext context,
-                java.lang.String prefix, boolean defaultValue) {
-            RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
-                    context.getEnvironment(), prefix);
-            return resolver.getProperty("enabled", Boolean.class, defaultValue);
         }
+        return language;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageConfiguration.java b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageConfiguration.java
index 8811497..60ce848 100644
--- a/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.builder.script.springboot;
 
 import javax.annotation.Generated;
+import org.apache.camel.spring.boot.LanguageConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -26,7 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.language.ruby")
-public class RubyLanguageConfiguration {
+public class RubyLanguageConfiguration
+        extends
+            LanguageConfigurationPropertiesCommon {
 
     /**
      * Whether to trim the value to remove leading and trailing whitespaces and

http://git-wip-us.apache.org/repos/asf/camel/blob/3eeb97ac/platforms/spring-boot/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java
index f201ffe..3e176b0 100644
--- a/platforms/spring-boot/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java
@@ -17,50 +17,81 @@
 package org.apache.camel.component.servicenow.springboot;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.servicenow.ServiceNowComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.boot.bind.RelaxedPropertyResolver;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
 @Configuration
-@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(ServiceNowComponentAutoConfiguration.Condition.class)
-@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
-@EnableConfigurationProperties(ServiceNowComponentConfiguration.class)
-public class ServiceNowComponentAutoConfiguration {
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        ServiceNowComponentConfiguration.class})
+public class ServiceNowComponentAutoConfiguration extends AllNestedConditions {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(ServiceNowComponentAutoConfiguration.class);
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<ServiceNowComponent>> customizers;
+    @Autowired
+    private ComponentConfigurationProperties globalConfiguration;
+    @Autowired
+    private ServiceNowComponentConfiguration componentConfiguration;
+
+    public ServiceNowComponentAutoConfiguration() {
+        super(ConfigurationPhase.REGISTER_BEAN);
+    }
+
+    @ConditionalOnBean(CamelContext.class)
+    public static class OnCamelContext {
+    }
+
+    @ConditionalOnBean(CamelAutoConfiguration.class)
+    public static class OnCamelAutoConfiguration {
+    }
+
+    public static class Condition extends GroupCondition {
+        public Condition() {
+            super("camel.component", "camel.component.servicenow");
+        }
+    }
 
     @Lazy
     @Bean(name = "servicenow-component")
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean(ServiceNowComponent.class)
-    public ServiceNowComponent configureServiceNowComponent(
-            CamelContext camelContext,
-            ServiceNowComponentConfiguration configuration) throws Exception {
+    public ServiceNowComponent configureServiceNowComponent() throws Exception {
         ServiceNowComponent component = new ServiceNowComponent();
         component.setCamelContext(camelContext);
         Map<String, Object> parameters = new HashMap<>();
-        IntrospectionSupport.getProperties(configuration, parameters, null,
-                false);
+        IntrospectionSupport.getProperties(componentConfiguration, parameters,
+                null, false);
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             Object value = entry.getValue();
             Class<?> paramClass = value.getClass();
@@ -83,32 +114,16 @@ public class ServiceNowComponentAutoConfiguration {
         }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
-        return component;
-    }
-
-    @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-    public static class Condition extends SpringBootCondition {
-        @Override
-        public ConditionOutcome getMatchOutcome(
-                ConditionContext conditionContext,
-                AnnotatedTypeMetadata annotatedTypeMetadata) {
-            boolean groupEnabled = isEnabled(conditionContext,
-                    "camel.component.", true);
-            ConditionMessage.Builder message = ConditionMessage
-                    .forCondition("camel.component.servicenow");
-            if (isEnabled(conditionContext, "camel.component.servicenow.",
-                    groupEnabled)) {
-                return ConditionOutcome.match(message.because("enabled"));