You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2016/12/06 16:08:58 UTC
[01/15] camel git commit: CAMEL-10550: spring-boot: add a global
option to disable data-format, languages and component auto configurations
Repository: camel
Updated Branches:
refs/heads/camel-2.18.x 1a2874674 -> 82ba1b804
CAMEL-10550: spring-boot: add a global option to disable data-format, languages and component auto configurations
(cherry picked from commit 21b0fe2cf5602894f254d788de6d6e4755163c8a)
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2d902abd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2d902abd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2d902abd
Branch: refs/heads/camel-2.18.x
Commit: 2d902abd200ab86ee268337c772dc0e6e2a4ee3a
Parents: 1a28746
Author: lburgazzoli <lb...@gmail.com>
Authored: Tue Dec 6 14:31:53 2016 +0100
Committer: lburgazzoli <lb...@gmail.com>
Committed: Tue Dec 6 14:31:53 2016 +0100
----------------------------------------------------------------------
.../boot/ComponentConfigurationProperties.java | 33 ++++
.../boot/DataFormatConfigurationProperties.java | 33 ++++
.../boot/LanguageConfigurationProperties.java | 33 ++++
spring-boot-dm/pom.xml | 2 +-
.../maven/camel-package-maven-plugin/pom.xml | 6 +
.../SpringBootAutoConfigurationMojo.java | 161 +++++++++++++++++--
6 files changed, 255 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/2d902abd/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/ComponentConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/ComponentConfigurationProperties.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/ComponentConfigurationProperties.java
new file mode 100644
index 0000000..804dc45
--- /dev/null
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/ComponentConfigurationProperties.java
@@ -0,0 +1,33 @@
+/**
+ * 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.spring.boot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@ConfigurationProperties(prefix = "camel.component")
+public class ComponentConfigurationProperties {
+ private boolean enabled = true;
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/2d902abd/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/DataFormatConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/DataFormatConfigurationProperties.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/DataFormatConfigurationProperties.java
new file mode 100644
index 0000000..5c0e3d8
--- /dev/null
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/DataFormatConfigurationProperties.java
@@ -0,0 +1,33 @@
+/**
+ * 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.spring.boot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@ConfigurationProperties(prefix = "camel.dataformat")
+public class DataFormatConfigurationProperties {
+ private boolean enabled = true;
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/2d902abd/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/LanguageConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/LanguageConfigurationProperties.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/LanguageConfigurationProperties.java
new file mode 100644
index 0000000..d577a3a
--- /dev/null
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/LanguageConfigurationProperties.java
@@ -0,0 +1,33 @@
+/**
+ * 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.spring.boot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@ConfigurationProperties(prefix = "camel.language")
+public class LanguageConfigurationProperties {
+ private boolean enabled = true;
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/2d902abd/spring-boot-dm/pom.xml
----------------------------------------------------------------------
diff --git a/spring-boot-dm/pom.xml b/spring-boot-dm/pom.xml
index c60b213..eae9dd8 100644
--- a/spring-boot-dm/pom.xml
+++ b/spring-boot-dm/pom.xml
@@ -36,7 +36,7 @@
<properties>
<!-- Spring-Boot target version -->
- <spring-boot-version>1.4.1.RELEASE</spring-boot-version>
+ <spring-boot-version>1.4.2.RELEASE</spring-boot-version>
<!-- The following dependencies should be aligned with the ones in standard camel parent -->
<avro-version>1.8.1</avro-version>
http://git-wip-us.apache.org/repos/asf/camel/blob/2d902abd/tooling/maven/camel-package-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/pom.xml b/tooling/maven/camel-package-maven-plugin/pom.xml
index af3f163..fcccb424 100644
--- a/tooling/maven/camel-package-maven-plugin/pom.xml
+++ b/tooling/maven/camel-package-maven-plugin/pom.xml
@@ -91,6 +91,12 @@
<artifactId>commons-io</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>${gson-version}</version>
+ </dependency>
+
<!-- roaster to create java source for Spring Boot auto configuration support -->
<dependency>
<groupId>org.jboss.forge.roaster</groupId>
http://git-wip-us.apache.org/repos/asf/camel/blob/2d902abd/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 65e14c0..19e3375 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,9 +16,11 @@
*/
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;
@@ -39,6 +41,8 @@ import java.util.TreeSet;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
+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;
@@ -63,13 +67,22 @@ import org.jboss.forge.roaster.model.source.JavaClassSource;
import org.jboss.forge.roaster.model.source.MethodSource;
import org.jboss.forge.roaster.model.source.PropertySource;
import org.jboss.forge.roaster.model.util.Strings;
+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.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.DeprecatedConfigurationProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
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;
import static org.apache.camel.maven.packaging.JSonSchemaHelper.getSafeValue;
import static org.apache.camel.maven.packaging.PackageHelper.loadText;
@@ -196,7 +209,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
}
createComponentConfigurationSource(pkg, model, overrideComponentName);
- createComponentAutoConfigurationSource(pkg, model, aliases);
+ createComponentAutoConfigurationSource(pkg, model, aliases, overrideComponentName);
createComponentSpringFactorySource(pkg, model);
}
}
@@ -246,7 +259,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
}
createDataFormatConfigurationSource(pkg, model, overrideDataformatName);
- createDataFormatAutoConfigurationSource(pkg, model, aliases);
+ createDataFormatAutoConfigurationSource(pkg, model, aliases, overrideDataformatName);
createDataFormatSpringFactorySource(pkg, model);
}
}
@@ -296,7 +309,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
}
createLanguageConfigurationSource(pkg, model, overrideLanguageName);
- createLanguageAutoConfigurationSource(pkg, model, aliases);
+ createLanguageAutoConfigurationSource(pkg, model, aliases, overrideLanguageName);
createLanguageSpringFactorySource(pkg, model);
}
}
@@ -754,12 +767,13 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
writeSourceIfChanged(javaClass, fileName);
}
- private void createComponentAutoConfigurationSource(String packageName, ComponentModel model, List<String> componentAliases) throws MojoFailureException {
+ private void createComponentAutoConfigurationSource(String packageName, ComponentModel model, List<String> componentAliases, String overrideComponentName) throws MojoFailureException {
final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
int pos = model.getJavaType().lastIndexOf(".");
String name = model.getJavaType().substring(pos + 1);
name = name.replace("Component", "ComponentAutoConfiguration");
+
javaClass.setPackage(packageName).setName(name);
String doc = "Generated by camel-package-maven-plugin - do not edit this file!";
@@ -770,6 +784,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
String configurationName = name.replace("ComponentAutoConfiguration", "ComponentConfiguration");
AnnotationSource<JavaClassSource> ann = javaClass.addAnnotation(EnableConfigurationProperties.class);
ann.setLiteralValue("value", configurationName + ".class");
+ javaClass.addAnnotation(Conditional.class).setLiteralValue(name + ".Condition.class");
// add method for auto configure
@@ -799,19 +814,30 @@ 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.component",
+ (overrideComponentName != null ? overrideComponentName : model.getScheme()).toLowerCase(Locale.US)
+ ));
+
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) throws MojoFailureException {
+ private void createDataFormatAutoConfigurationSource(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!";
@@ -822,6 +848,8 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
String configurationName = name.replace("DataFormatAutoConfiguration", "DataFormatConfiguration");
AnnotationSource<JavaClassSource> ann = javaClass.addAnnotation(EnableConfigurationProperties.class);
ann.setLiteralValue("value", configurationName + ".class");
+
+ javaClass.addAnnotation(Conditional.class).setLiteralValue(name + ".Condition.class");
// add method for auto configure
@@ -845,7 +873,6 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
method.addParameter("CamelContext", "camelContext");
method.addParameter(configurationName, "configuration");
-
// Determine all the aliases
// adding the '-dataformat' suffix to prevent collision with component names
String[] springBeanAliases = dataFormatAliases.stream().map(alias -> alias + "-dataformat").toArray(size -> new String[size]);
@@ -854,19 +881,30 @@ 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) throws MojoFailureException {
+ private void createLanguageAutoConfigurationSource(String packageName, LanguageModel model, List<String> languageAliases, String overrideLanguageName) throws MojoFailureException {
final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
int pos = model.getJavaType().lastIndexOf(".");
String name = model.getJavaType().substring(pos + 1);
name = name.replace("Language", "LanguageAutoConfiguration");
+
javaClass.setPackage(packageName).setName(name);
String doc = "Generated by camel-package-maven-plugin - do not edit this file!";
@@ -877,6 +915,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
String configurationName = name.replace("LanguageAutoConfiguration", "LanguageConfiguration");
AnnotationSource<JavaClassSource> ann = javaClass.addAnnotation(EnableConfigurationProperties.class);
ann.setLiteralValue("value", configurationName + ".class");
+ javaClass.addAnnotation(Conditional.class).setLiteralValue(name + ".Condition.class");
// add method for auto configure
@@ -900,7 +939,6 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
method.addParameter("CamelContext", "camelContext");
method.addParameter(configurationName, "configuration");
-
// Determine all the aliases
// adding the '-language' suffix to prevent collision with component names
String[] springBeanAliases = languageAliases.stream().map(alias -> alias + "-language").toArray(size -> new String[size]);
@@ -909,11 +947,21 @@ 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 {
@@ -1409,6 +1457,52 @@ 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";
+ File target = new File(SpringBootHelper.starterResourceDir(baseDir, project.getArtifactId()), fileName);
+
+ deleteFileOnMainArtifact(target);
+
+ try {
+ Gson gson = new GsonBuilder().setPrettyPrinting().create();
+ Map<String, Object> map = null;
+ List<Map<String, Object>> properties = null;
+
+ if (target.exists()) {
+ BufferedReader br = new BufferedReader(new FileReader(target));
+ map = gson.fromJson(br, Map.class);
+
+ properties = (List<Map<String, Object>>)map.get("properties");
+ if (properties != null && properties.stream().anyMatch(m -> fullQualifiedName.equals(m.get("name")))) {
+ getLog().debug("No changes to existing file: " + target);
+ return;
+ }
+ }
+
+ Map<String, Object> meta = new HashMap();
+ meta.put("name", fullQualifiedName);
+ meta.put("type", "java.lang.Boolean");
+ meta.put("defaultValue", true);
+ meta.put("description", "Enable " + name + " " + type);
+
+ if (properties == null) {
+ properties = new ArrayList<>(1);
+ }
+
+ if (map == null) {
+ map = new HashMap();
+ }
+
+ properties.add(meta);
+ map.put("properties", properties);
+
+ FileUtils.write(target, gson.toJson(map));
+ } catch (Exception e) {
+ throw new MojoFailureException("IOError with file " + target, e);
+ }
+ }
+
private void deleteFileOnMainArtifact(File starterFile) {
if (!DELETE_FILES_ON_MAIN_ARTIFACTS) {
return;
@@ -1424,4 +1518,47 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
}
}
+ private JavaClassSource createConditionType(JavaClassSource parentClass, String prefix, String type) {
+ parentClass.addImport(ConditionMessage.class);
+ parentClass.addImport(ConditionContext.class);
+ parentClass.addImport(ConditionOutcome.class);
+ parentClass.addImport(RelaxedPropertyResolver.class);
+ parentClass.addImport(AnnotatedTypeMetadata.class);
+ parentClass.addImport(SpringBootCondition.class);
+
+ JavaClassSource condition = Roaster.create(JavaClassSource.class);
+ condition.setName("Condition");
+ condition.extendSuperType(SpringBootCondition.class);
+ condition.setPublic();
+ condition.setStatic(true);
+
+ String fullQualifiedType = prefix.endsWith(".") ? prefix + type : prefix + "." + type;
+
+ MethodSource<JavaClassSource> isEnabled = condition.addMethod();
+ isEnabled.setName("isEnabled");
+ isEnabled.setPrivate();
+ isEnabled.addParameter(ConditionContext.class, "context");
+ isEnabled.addParameter(String.class, "prefix");
+ isEnabled.addParameter(boolean.class, "defaultValue");
+ isEnabled.setReturnType(boolean.class);
+ isEnabled.setBody(new StringBuilder()
+ .append("RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(context.getEnvironment(), prefix);\n")
+ .append("return resolver.getProperty(\"enabled\", Boolean.class, defaultValue);")
+ .toString()
+ );
+
+ MethodSource<JavaClassSource> matchMethod = condition.getMethod("getMatchOutcome", ConditionContext.class, AnnotatedTypeMetadata.class);
+ matchMethod.setBody(new StringBuilder()
+ .append("boolean groupEnabled = isEnabled(conditionContext, \"").append(prefix).append(".\", true);\n")
+ .append("ConditionMessage.Builder message = ConditionMessage.forCondition(\"").append(fullQualifiedType).append("\");\n")
+ .append("if (isEnabled(conditionContext, \"").append(fullQualifiedType).append(".\", groupEnabled)) {\n")
+ .append(" return ConditionOutcome.match(message.because(\"enabled\"));\n")
+ .append("}\n")
+ .append("return ConditionOutcome.noMatch(message.because(\"not enabled\"));\n")
+ .toString()
+ );
+
+ return condition;
+ }
+
}
[07/15] camel git commit: CAMEL-10550: re-generated starters
Posted by lb...@apache.org.
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-freemarker-starter/src/main/java/org/apache/camel/component/freemarker/springboot/FreemarkerComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-freemarker-starter/src/main/java/org/apache/camel/component/freemarker/springboot/FreemarkerComponentAutoConfiguration.java b/components-starter/camel-freemarker-starter/src/main/java/org/apache/camel/component/freemarker/springboot/FreemarkerComponentAutoConfiguration.java
index dbecf5a..f876625 100644
--- a/components-starter/camel-freemarker-starter/src/main/java/org/apache/camel/component/freemarker/springboot/FreemarkerComponentAutoConfiguration.java
+++ b/components-starter/camel-freemarker-starter/src/main/java/org/apache/camel/component/freemarker/springboot/FreemarkerComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.freemarker.FreemarkerComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(FreemarkerComponentConfiguration.class)
+@Conditional(FreemarkerComponentAutoConfiguration.Condition.class)
public class FreemarkerComponentAutoConfiguration {
@Bean(name = "freemarker-component")
@@ -69,4 +77,29 @@ public class FreemarkerComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.freemarker");
+ if (isEnabled(conditionContext, "camel.component.freemarker.",
+ 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/2f9a99cc/components-starter/camel-freemarker-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-freemarker-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-freemarker-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..f71d4d1
--- /dev/null
+++ b/components-starter/camel-freemarker-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.freemarker.enabled",
+ "description": "Enable freemarker component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-ganglia-starter/src/main/java/org/apache/camel/component/ganglia/springboot/GangliaComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ganglia-starter/src/main/java/org/apache/camel/component/ganglia/springboot/GangliaComponentAutoConfiguration.java b/components-starter/camel-ganglia-starter/src/main/java/org/apache/camel/component/ganglia/springboot/GangliaComponentAutoConfiguration.java
index 7d25ac7..b39d7d3 100644
--- a/components-starter/camel-ganglia-starter/src/main/java/org/apache/camel/component/ganglia/springboot/GangliaComponentAutoConfiguration.java
+++ b/components-starter/camel-ganglia-starter/src/main/java/org/apache/camel/component/ganglia/springboot/GangliaComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.ganglia.GangliaComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(GangliaComponentConfiguration.class)
+@Conditional(GangliaComponentAutoConfiguration.Condition.class)
public class GangliaComponentAutoConfiguration {
@Bean(name = "ganglia-component")
@@ -69,4 +77,29 @@ public class GangliaComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.ganglia");
+ if (isEnabled(conditionContext, "camel.component.ganglia.",
+ 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/2f9a99cc/components-starter/camel-ganglia-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-ganglia-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-ganglia-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..24b85ca
--- /dev/null
+++ b/components-starter/camel-ganglia-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.ganglia.enabled",
+ "description": "Enable ganglia component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-google-calendar-starter/src/main/java/org/apache/camel/component/google/calendar/springboot/GoogleCalendarComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-google-calendar-starter/src/main/java/org/apache/camel/component/google/calendar/springboot/GoogleCalendarComponentAutoConfiguration.java b/components-starter/camel-google-calendar-starter/src/main/java/org/apache/camel/component/google/calendar/springboot/GoogleCalendarComponentAutoConfiguration.java
index 6cd5190..088bf4a 100644
--- a/components-starter/camel-google-calendar-starter/src/main/java/org/apache/camel/component/google/calendar/springboot/GoogleCalendarComponentAutoConfiguration.java
+++ b/components-starter/camel-google-calendar-starter/src/main/java/org/apache/camel/component/google/calendar/springboot/GoogleCalendarComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.google.calendar.GoogleCalendarComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(GoogleCalendarComponentConfiguration.class)
+@Conditional(GoogleCalendarComponentAutoConfiguration.Condition.class)
public class GoogleCalendarComponentAutoConfiguration {
@Bean(name = "google-calendar-component")
@@ -70,4 +78,29 @@ public class GoogleCalendarComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.google-calendar");
+ if (isEnabled(conditionContext, "camel.component.google-calendar.",
+ 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/2f9a99cc/components-starter/camel-google-calendar-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-google-calendar-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-google-calendar-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..084b664
--- /dev/null
+++ b/components-starter/camel-google-calendar-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.google-calendar.enabled",
+ "description": "Enable google-calendar component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-google-drive-starter/src/main/java/org/apache/camel/component/google/drive/springboot/GoogleDriveComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-google-drive-starter/src/main/java/org/apache/camel/component/google/drive/springboot/GoogleDriveComponentAutoConfiguration.java b/components-starter/camel-google-drive-starter/src/main/java/org/apache/camel/component/google/drive/springboot/GoogleDriveComponentAutoConfiguration.java
index 47b8e6e..30978eb 100644
--- a/components-starter/camel-google-drive-starter/src/main/java/org/apache/camel/component/google/drive/springboot/GoogleDriveComponentAutoConfiguration.java
+++ b/components-starter/camel-google-drive-starter/src/main/java/org/apache/camel/component/google/drive/springboot/GoogleDriveComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.google.drive.GoogleDriveComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(GoogleDriveComponentConfiguration.class)
+@Conditional(GoogleDriveComponentAutoConfiguration.Condition.class)
public class GoogleDriveComponentAutoConfiguration {
@Bean(name = "google-drive-component")
@@ -69,4 +77,29 @@ public class GoogleDriveComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.google-drive");
+ if (isEnabled(conditionContext, "camel.component.google-drive.",
+ 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/2f9a99cc/components-starter/camel-google-drive-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-google-drive-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-google-drive-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..be996e5
--- /dev/null
+++ b/components-starter/camel-google-drive-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.google-drive.enabled",
+ "description": "Enable google-drive component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentAutoConfiguration.java b/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentAutoConfiguration.java
index 7cfac41..21e90be 100644
--- a/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentAutoConfiguration.java
+++ b/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.google.mail.GoogleMailComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(GoogleMailComponentConfiguration.class)
+@Conditional(GoogleMailComponentAutoConfiguration.Condition.class)
public class GoogleMailComponentAutoConfiguration {
@Bean(name = "google-mail-component")
@@ -69,4 +77,29 @@ public class GoogleMailComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.google-mail");
+ if (isEnabled(conditionContext, "camel.component.google-mail.",
+ 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/2f9a99cc/components-starter/camel-google-mail-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-google-mail-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-google-mail-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..2c2da73
--- /dev/null
+++ b/components-starter/camel-google-mail-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.google-mail.enabled",
+ "description": "Enable google-mail component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-groovy-starter/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-groovy-starter/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java b/components-starter/camel-groovy-starter/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java
index b5efa61..40a635c 100644
--- a/components-starter/camel-groovy-starter/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java
+++ b/components-starter/camel-groovy-starter/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.groovy.GroovyLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(GroovyLanguageConfiguration.class)
+@Conditional(GroovyLanguageAutoConfiguration.Condition.class)
public class GroovyLanguageAutoConfiguration {
@Bean(name = "groovy-language")
@@ -51,4 +59,29 @@ public class GroovyLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.groovy");
+ if (isEnabled(conditionContext, "camel.language.groovy.",
+ 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/2f9a99cc/components-starter/camel-groovy-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-groovy-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-groovy-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..a996003
--- /dev/null
+++ b/components-starter/camel-groovy-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.language.groovy.enabled",
+ "description": "Enable groovy language",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatAutoConfiguration.java b/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatAutoConfiguration.java
index c3c66df..184074b 100644
--- a/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatAutoConfiguration.java
+++ b/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.component.gson.GsonDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(GsonDataFormatConfiguration.class)
+@Conditional(GsonDataFormatAutoConfiguration.Condition.class)
public class GsonDataFormatAutoConfiguration {
@Bean(name = "json-gson-dataformat")
@@ -51,4 +59,29 @@ public class GsonDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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-gson");
+ if (isEnabled(conditionContext, "camel.dataformat.json-gson.",
+ 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/2f9a99cc/components-starter/camel-gson-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-gson-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-gson-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..59473b3
--- /dev/null
+++ b/components-starter/camel-gson-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.json-gson.enabled",
+ "description": "Enable json-gson dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java b/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java
index 636a8c6..bf247a8 100644
--- a/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java
+++ b/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.guava.eventbus.GuavaEventBusComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(GuavaEventBusComponentConfiguration.class)
+@Conditional(GuavaEventBusComponentAutoConfiguration.Condition.class)
public class GuavaEventBusComponentAutoConfiguration {
@Bean(name = "guava-eventbus-component")
@@ -69,4 +77,29 @@ public class GuavaEventBusComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.guava-eventbus");
+ if (isEnabled(conditionContext, "camel.component.guava-eventbus.",
+ 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/2f9a99cc/components-starter/camel-guava-eventbus-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-guava-eventbus-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-guava-eventbus-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..78c1f65
--- /dev/null
+++ b/components-starter/camel-guava-eventbus-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.guava-eventbus.enabled",
+ "description": "Enable guava-eventbus component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java b/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java
index 2d54892..114197d 100644
--- a/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java
+++ b/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.hazelcast.HazelcastComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(HazelcastComponentConfiguration.class)
+@Conditional(HazelcastComponentAutoConfiguration.Condition.class)
public class HazelcastComponentAutoConfiguration {
@Bean(name = "hazelcast-component")
@@ -69,4 +77,29 @@ public class HazelcastComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.hazelcast");
+ if (isEnabled(conditionContext, "camel.component.hazelcast.",
+ 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/2f9a99cc/components-starter/camel-hazelcast-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-hazelcast-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-hazelcast-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..89d80d7
--- /dev/null
+++ b/components-starter/camel-hazelcast-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.hazelcast.enabled",
+ "description": "Enable hazelcast component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java b/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java
index b0ef4fb..0509861 100644
--- a/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java
+++ b/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.hbase.HBaseComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(HBaseComponentConfiguration.class)
+@Conditional(HBaseComponentAutoConfiguration.Condition.class)
public class HBaseComponentAutoConfiguration {
@Bean(name = "hbase-component")
@@ -68,4 +76,29 @@ public class HBaseComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.hbase");
+ if (isEnabled(conditionContext, "camel.component.hbase.",
+ 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/2f9a99cc/components-starter/camel-hbase-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-hbase-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-hbase-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..2246cb5
--- /dev/null
+++ b/components-starter/camel-hbase-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.hbase.enabled",
+ "description": "Enable hbase component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java b/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java
index 987b615..44541f8 100644
--- a/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java
+++ b/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.hdfs.HdfsComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(HdfsComponentConfiguration.class)
+@Conditional(HdfsComponentAutoConfiguration.Condition.class)
public class HdfsComponentAutoConfiguration {
@Bean(name = "hdfs-component")
@@ -68,4 +76,29 @@ public class HdfsComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.hdfs");
+ if (isEnabled(conditionContext, "camel.component.hdfs.",
+ 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/2f9a99cc/components-starter/camel-hdfs-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-hdfs-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-hdfs-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..6d2fd0d
--- /dev/null
+++ b/components-starter/camel-hdfs-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.hdfs.enabled",
+ "description": "Enable hdfs component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java b/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java
index c7a1e1d..c169001 100644
--- a/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java
+++ b/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.hdfs2.HdfsComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(HdfsComponentConfiguration.class)
+@Conditional(HdfsComponentAutoConfiguration.Condition.class)
public class HdfsComponentAutoConfiguration {
@Bean(name = "hdfs2-component")
@@ -68,4 +76,29 @@ public class HdfsComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.hdfs2");
+ if (isEnabled(conditionContext, "camel.component.hdfs2.",
+ 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/2f9a99cc/components-starter/camel-hdfs2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-hdfs2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-hdfs2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..796fed7
--- /dev/null
+++ b/components-starter/camel-hdfs2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.hdfs2.enabled",
+ "description": "Enable hdfs2 component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-hessian-starter/src/main/java/org/apache/camel/dataformat/hessian/springboot/HessianDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hessian-starter/src/main/java/org/apache/camel/dataformat/hessian/springboot/HessianDataFormatAutoConfiguration.java b/components-starter/camel-hessian-starter/src/main/java/org/apache/camel/dataformat/hessian/springboot/HessianDataFormatAutoConfiguration.java
index 6243ba8..258d406 100644
--- a/components-starter/camel-hessian-starter/src/main/java/org/apache/camel/dataformat/hessian/springboot/HessianDataFormatAutoConfiguration.java
+++ b/components-starter/camel-hessian-starter/src/main/java/org/apache/camel/dataformat/hessian/springboot/HessianDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.hessian.HessianDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(HessianDataFormatConfiguration.class)
+@Conditional(HessianDataFormatAutoConfiguration.Condition.class)
public class HessianDataFormatAutoConfiguration {
@Bean(name = "hessian-dataformat")
@@ -52,4 +60,29 @@ public class HessianDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.hessian");
+ if (isEnabled(conditionContext, "camel.dataformat.hessian.",
+ 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/2f9a99cc/components-starter/camel-hessian-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-hessian-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-hessian-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..35cd4d6
--- /dev/null
+++ b/components-starter/camel-hessian-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.hessian.enabled",
+ "description": "Enable hessian dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/HL7DataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/HL7DataFormatAutoConfiguration.java b/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/HL7DataFormatAutoConfiguration.java
index b34409d..634b59a 100644
--- a/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/HL7DataFormatAutoConfiguration.java
+++ b/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/HL7DataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.component.hl7.HL7DataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(HL7DataFormatConfiguration.class)
+@Conditional(HL7DataFormatAutoConfiguration.Condition.class)
public class HL7DataFormatAutoConfiguration {
@Bean(name = "hl7-dataformat")
@@ -51,4 +59,29 @@ public class HL7DataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.hl7");
+ if (isEnabled(conditionContext, "camel.dataformat.hl7.",
+ 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/2f9a99cc/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java b/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java
index 8a7994f..a3e80bd 100644
--- a/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java
+++ b/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.component.hl7.TerserLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(TerserLanguageConfiguration.class)
+@Conditional(TerserLanguageAutoConfiguration.Condition.class)
public class TerserLanguageAutoConfiguration {
@Bean(name = "terser-language")
@@ -51,4 +59,29 @@ public class TerserLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.terser");
+ if (isEnabled(conditionContext, "camel.language.terser.",
+ 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/2f9a99cc/components-starter/camel-hl7-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-hl7-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-hl7-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..5df4da3
--- /dev/null
+++ b/components-starter/camel-hl7-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,16 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.hl7.enabled",
+ "description": "Enable hl7 dataformat",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.terser.enabled",
+ "description": "Enable terser language",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java b/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java
index 1397ebb..062960c 100644
--- a/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java
+++ b/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.http.HttpComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(HttpComponentConfiguration.class)
+@Conditional(HttpComponentAutoConfiguration.Condition.class)
public class HttpComponentAutoConfiguration {
@Bean(name = {"http-component", "https-component"})
@@ -68,4 +76,29 @@ public class HttpComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.http");
+ if (isEnabled(conditionContext, "camel.component.http.",
+ 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/2f9a99cc/components-starter/camel-http-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-http-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-http-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..fc3d3bf
--- /dev/null
+++ b/components-starter/camel-http-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.http.enabled",
+ "description": "Enable http component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java b/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
index 126e7c1..38e92d9 100644
--- a/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
+++ b/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.http4.HttpComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(HttpComponentConfiguration.class)
+@Conditional(HttpComponentAutoConfiguration.Condition.class)
public class HttpComponentAutoConfiguration {
@Bean(name = "http4-component")
@@ -68,4 +76,29 @@ public class HttpComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.http4");
+ if (isEnabled(conditionContext, "camel.component.http4.",
+ 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/2f9a99cc/components-starter/camel-http4-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-http4-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-http4-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..13c8856
--- /dev/null
+++ b/components-starter/camel-http4-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.http4.enabled",
+ "description": "Enable http4 component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-ical-starter/src/main/java/org/apache/camel/component/ical/springboot/ICalDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ical-starter/src/main/java/org/apache/camel/component/ical/springboot/ICalDataFormatAutoConfiguration.java b/components-starter/camel-ical-starter/src/main/java/org/apache/camel/component/ical/springboot/ICalDataFormatAutoConfiguration.java
index 60bab0d..a0795a1 100644
--- a/components-starter/camel-ical-starter/src/main/java/org/apache/camel/component/ical/springboot/ICalDataFormatAutoConfiguration.java
+++ b/components-starter/camel-ical-starter/src/main/java/org/apache/camel/component/ical/springboot/ICalDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.component.ical.ICalDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ICalDataFormatConfiguration.class)
+@Conditional(ICalDataFormatAutoConfiguration.Condition.class)
public class ICalDataFormatAutoConfiguration {
@Bean(name = "ical-dataformat")
@@ -51,4 +59,29 @@ public class ICalDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.ical");
+ if (isEnabled(conditionContext, "camel.dataformat.ical.",
+ 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/2f9a99cc/components-starter/camel-ical-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-ical-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-ical-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..36fbef0
--- /dev/null
+++ b/components-starter/camel-ical-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.ical.enabled",
+ "description": "Enable ical dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatAutoConfiguration.java b/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatAutoConfiguration.java
index 279fc73..90b0cad 100644
--- a/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatAutoConfiguration.java
+++ b/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.component.jackson.JacksonDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JacksonDataFormatConfiguration.class)
+@Conditional(JacksonDataFormatAutoConfiguration.Condition.class)
public class JacksonDataFormatAutoConfiguration {
@Bean(name = "json-jackson-dataformat")
@@ -52,4 +60,29 @@ public class JacksonDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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-jackson");
+ if (isEnabled(conditionContext, "camel.dataformat.json-jackson.",
+ 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/2f9a99cc/components-starter/camel-jackson-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jackson-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jackson-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..d970d25
--- /dev/null
+++ b/components-starter/camel-jackson-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.json-jackson.enabled",
+ "description": "Enable json-jackson dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
[08/15] camel git commit: CAMEL-10550: re-generated starters
Posted by lb...@apache.org.
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java
index 49f3588..e81adac 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.ref.RefLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(RefLanguageConfiguration.class)
+@Conditional(RefLanguageAutoConfiguration.Condition.class)
public class RefLanguageAutoConfiguration {
@Bean(name = "ref-language")
@@ -51,4 +59,28 @@ public class RefLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.ref");
+ if (isEnabled(conditionContext, "camel.language.ref.", 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java
index 422ea84..b27ffd7 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.simple.FileLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(FileLanguageConfiguration.class)
+@Conditional(FileLanguageAutoConfiguration.Condition.class)
public class FileLanguageAutoConfiguration {
@Bean(name = "file-language")
@@ -51,4 +59,29 @@ public class FileLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.file");
+ if (isEnabled(conditionContext, "camel.language.file.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java
index 52811ec..bb10195 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.simple.SimpleLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SimpleLanguageConfiguration.class)
+@Conditional(SimpleLanguageAutoConfiguration.Condition.class)
public class SimpleLanguageAutoConfiguration {
@Bean(name = "simple-language")
@@ -51,4 +59,29 @@ public class SimpleLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.simple");
+ if (isEnabled(conditionContext, "camel.language.simple.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.java
index 6a902ac..c470b8c 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.tokenizer.TokenizeLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(TokenizeLanguageConfiguration.class)
+@Conditional(TokenizeLanguageAutoConfiguration.Condition.class)
public class TokenizeLanguageAutoConfiguration {
@Bean(name = "tokenize-language")
@@ -52,4 +60,29 @@ public class TokenizeLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.tokenize");
+ if (isEnabled(conditionContext, "camel.language.tokenize.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.java
index 9d8fd7b..149019d 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.tokenizer.XMLTokenizeLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(XMLTokenizeLanguageConfiguration.class)
+@Conditional(XMLTokenizeLanguageAutoConfiguration.Condition.class)
public class XMLTokenizeLanguageAutoConfiguration {
@Bean(name = "xtokenize-language")
@@ -52,4 +60,29 @@ public class XMLTokenizeLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.xtokenize");
+ if (isEnabled(conditionContext, "camel.language.xtokenize.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java
index 2dfd6b8..2589dc4 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.xpath.XPathLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(XPathLanguageConfiguration.class)
+@Conditional(XPathLanguageAutoConfiguration.Condition.class)
public class XPathLanguageAutoConfiguration {
@Bean(name = "xpath-language")
@@ -51,4 +59,29 @@ public class XPathLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.xpath");
+ if (isEnabled(conditionContext, "camel.language.xpath.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-core-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..cdacacc
--- /dev/null
+++ b/components-starter/camel-core-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,154 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.direct.enabled",
+ "description": "Enable direct component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.vm.enabled",
+ "description": "Enable vm component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.direct-vm.enabled",
+ "description": "Enable direct-vm component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.seda.enabled",
+ "description": "Enable seda component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.stub.enabled",
+ "description": "Enable stub component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.log.enabled",
+ "description": "Enable log component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.scheduler.enabled",
+ "description": "Enable scheduler component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.xslt.enabled",
+ "description": "Enable xslt component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.rest.enabled",
+ "description": "Enable rest component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.validator.enabled",
+ "description": "Enable validator component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.properties.enabled",
+ "description": "Enable properties component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.string.enabled",
+ "description": "Enable string dataformat",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.zip.enabled",
+ "description": "Enable zip dataformat",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.serialization.enabled",
+ "description": "Enable serialization dataformat",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.gzip.enabled",
+ "description": "Enable gzip dataformat",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.constant.enabled",
+ "description": "Enable constant language",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.simple.enabled",
+ "description": "Enable simple language",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.bean.enabled",
+ "description": "Enable bean language",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.ref.enabled",
+ "description": "Enable ref language",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.header.enabled",
+ "description": "Enable header language",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.xpath.enabled",
+ "description": "Enable xpath language",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.file.enabled",
+ "description": "Enable file language",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.exchangeproperty.enabled",
+ "description": "Enable exchangeproperty language",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.tokenize.enabled",
+ "description": "Enable tokenize language",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.xtokenize.enabled",
+ "description": "Enable xtokenize language",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java
index 8c70a6b..cf701b3 100644
--- a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java
+++ b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.crypto.DigitalSignatureComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(DigitalSignatureComponentConfiguration.class)
+@Conditional(DigitalSignatureComponentAutoConfiguration.Condition.class)
public class DigitalSignatureComponentAutoConfiguration {
@Bean(name = "crypto-component")
@@ -70,4 +78,29 @@ public class DigitalSignatureComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.crypto");
+ if (isEnabled(conditionContext, "camel.component.crypto.",
+ 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/2f9a99cc/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/CryptoDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/CryptoDataFormatAutoConfiguration.java b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/CryptoDataFormatAutoConfiguration.java
index cef5506..10d466e 100644
--- a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/CryptoDataFormatAutoConfiguration.java
+++ b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/CryptoDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.converter.crypto.CryptoDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(CryptoDataFormatConfiguration.class)
+@Conditional(CryptoDataFormatAutoConfiguration.Condition.class)
public class CryptoDataFormatAutoConfiguration {
@Bean(name = "crypto-dataformat")
@@ -52,4 +60,29 @@ public class CryptoDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.crypto");
+ if (isEnabled(conditionContext, "camel.dataformat.crypto.",
+ 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/2f9a99cc/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/PGPDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/PGPDataFormatAutoConfiguration.java b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/PGPDataFormatAutoConfiguration.java
index 49186eb..c1f2174 100644
--- a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/PGPDataFormatAutoConfiguration.java
+++ b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/PGPDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.converter.crypto.PGPDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(PGPDataFormatConfiguration.class)
+@Conditional(PGPDataFormatAutoConfiguration.Condition.class)
public class PGPDataFormatAutoConfiguration {
@Bean(name = "pgp-dataformat")
@@ -51,4 +59,29 @@ public class PGPDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.pgp");
+ if (isEnabled(conditionContext, "camel.dataformat.pgp.",
+ 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/2f9a99cc/components-starter/camel-crypto-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-crypto-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-crypto-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..8334237
--- /dev/null
+++ b/components-starter/camel-crypto-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,22 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.crypto.enabled",
+ "description": "Enable crypto component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.pgp.enabled",
+ "description": "Enable pgp dataformat",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.crypto.enabled",
+ "description": "Enable crypto dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatAutoConfiguration.java b/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatAutoConfiguration.java
index 7f3ad94..45b2793 100644
--- a/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatAutoConfiguration.java
+++ b/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.csv.CsvDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(CsvDataFormatConfiguration.class)
+@Conditional(CsvDataFormatAutoConfiguration.Condition.class)
public class CsvDataFormatAutoConfiguration {
@Bean(name = "csv-dataformat")
@@ -51,4 +59,29 @@ public class CsvDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.csv");
+ if (isEnabled(conditionContext, "camel.dataformat.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/2f9a99cc/components-starter/camel-csv-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-csv-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-csv-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..2936910
--- /dev/null
+++ b/components-starter/camel-csv-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.csv.enabled",
+ "description": "Enable csv dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java
index a52d310..d9530e8 100644
--- a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java
+++ b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.cxf.jaxrs.CxfRsComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(CxfRsComponentConfiguration.class)
+@Conditional(CxfRsComponentAutoConfiguration.Condition.class)
public class CxfRsComponentAutoConfiguration {
@Bean(name = "cxfrs-component")
@@ -68,4 +76,29 @@ public class CxfRsComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.cxfrs");
+ if (isEnabled(conditionContext, "camel.component.cxfrs.",
+ 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/2f9a99cc/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java
index b07762d..7faae3c 100644
--- a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java
+++ b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.cxf.CxfComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(CxfComponentConfiguration.class)
+@Conditional(CxfComponentAutoConfiguration.Condition.class)
public class CxfComponentAutoConfiguration {
@Bean(name = "cxf-component")
@@ -68,4 +76,29 @@ public class CxfComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.cxf");
+ if (isEnabled(conditionContext, "camel.component.cxf.",
+ 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/2f9a99cc/components-starter/camel-cxf-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-cxf-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-cxf-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..73db505
--- /dev/null
+++ b/components-starter/camel-cxf-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,16 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.cxfrs.enabled",
+ "description": "Enable cxfrs component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.cxf.enabled",
+ "description": "Enable cxf component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentAutoConfiguration.java b/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentAutoConfiguration.java
index b6adb12..73e8759 100644
--- a/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentAutoConfiguration.java
+++ b/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.disruptor.DisruptorComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(DisruptorComponentConfiguration.class)
+@Conditional(DisruptorComponentAutoConfiguration.Condition.class)
public class DisruptorComponentAutoConfiguration {
@Bean(name = "disruptor-component")
@@ -69,4 +77,29 @@ public class DisruptorComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.disruptor");
+ if (isEnabled(conditionContext, "camel.component.disruptor.",
+ 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/2f9a99cc/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentAutoConfiguration.java b/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentAutoConfiguration.java
index 3cb6920..ac160e9 100644
--- a/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentAutoConfiguration.java
+++ b/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.disruptor.vm.DisruptorVmComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(DisruptorVmComponentConfiguration.class)
+@Conditional(DisruptorVmComponentAutoConfiguration.Condition.class)
public class DisruptorVmComponentAutoConfiguration {
@Bean(name = "disruptor-vm-component")
@@ -69,4 +77,29 @@ public class DisruptorVmComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.disruptor-vm");
+ if (isEnabled(conditionContext, "camel.component.disruptor-vm.",
+ 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/2f9a99cc/components-starter/camel-disruptor-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-disruptor-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-disruptor-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..a853099
--- /dev/null
+++ b/components-starter/camel-disruptor-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,16 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.disruptor.enabled",
+ "description": "Enable disruptor component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.disruptor-vm.enabled",
+ "description": "Enable disruptor-vm component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-docker-starter/src/main/java/org/apache/camel/component/docker/springboot/DockerComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-docker-starter/src/main/java/org/apache/camel/component/docker/springboot/DockerComponentAutoConfiguration.java b/components-starter/camel-docker-starter/src/main/java/org/apache/camel/component/docker/springboot/DockerComponentAutoConfiguration.java
index df2dc17..0442ca7 100644
--- a/components-starter/camel-docker-starter/src/main/java/org/apache/camel/component/docker/springboot/DockerComponentAutoConfiguration.java
+++ b/components-starter/camel-docker-starter/src/main/java/org/apache/camel/component/docker/springboot/DockerComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.docker.DockerComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(DockerComponentConfiguration.class)
+@Conditional(DockerComponentAutoConfiguration.Condition.class)
public class DockerComponentAutoConfiguration {
@Bean(name = "docker-component")
@@ -68,4 +76,29 @@ public class DockerComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.docker");
+ if (isEnabled(conditionContext, "camel.component.docker.",
+ 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/2f9a99cc/components-starter/camel-docker-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-docker-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-docker-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..c424de2
--- /dev/null
+++ b/components-starter/camel-docker-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.docker.enabled",
+ "description": "Enable docker component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/elasticsearch/springboot/ElasticsearchComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/elasticsearch/springboot/ElasticsearchComponentAutoConfiguration.java b/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/elasticsearch/springboot/ElasticsearchComponentAutoConfiguration.java
index 7c0cc5c..90d25ad 100644
--- a/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/elasticsearch/springboot/ElasticsearchComponentAutoConfiguration.java
+++ b/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/elasticsearch/springboot/ElasticsearchComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.elasticsearch.ElasticsearchComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ElasticsearchComponentConfiguration.class)
+@Conditional(ElasticsearchComponentAutoConfiguration.Condition.class)
public class ElasticsearchComponentAutoConfiguration {
@Bean(name = "elasticsearch-component")
@@ -69,4 +77,29 @@ public class ElasticsearchComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.elasticsearch");
+ if (isEnabled(conditionContext, "camel.component.elasticsearch.",
+ 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/2f9a99cc/components-starter/camel-elasticsearch-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-elasticsearch-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-elasticsearch-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..85e308f
--- /dev/null
+++ b/components-starter/camel-elasticsearch-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.elasticsearch.enabled",
+ "description": "Enable elasticsearch component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-elsql-starter/src/main/java/org/apache/camel/component/elsql/springboot/ElsqlComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-elsql-starter/src/main/java/org/apache/camel/component/elsql/springboot/ElsqlComponentAutoConfiguration.java b/components-starter/camel-elsql-starter/src/main/java/org/apache/camel/component/elsql/springboot/ElsqlComponentAutoConfiguration.java
index 41826d3..bad1fa9 100644
--- a/components-starter/camel-elsql-starter/src/main/java/org/apache/camel/component/elsql/springboot/ElsqlComponentAutoConfiguration.java
+++ b/components-starter/camel-elsql-starter/src/main/java/org/apache/camel/component/elsql/springboot/ElsqlComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.elsql.ElsqlComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ElsqlComponentConfiguration.class)
+@Conditional(ElsqlComponentAutoConfiguration.Condition.class)
public class ElsqlComponentAutoConfiguration {
@Bean(name = "elsql-component")
@@ -68,4 +76,29 @@ public class ElsqlComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.elsql");
+ if (isEnabled(conditionContext, "camel.component.elsql.",
+ 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/2f9a99cc/components-starter/camel-elsql-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-elsql-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-elsql-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..e379945
--- /dev/null
+++ b/components-starter/camel-elsql-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.elsql.enabled",
+ "description": "Enable elsql component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-facebook-starter/src/main/java/org/apache/camel/component/facebook/springboot/FacebookComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-facebook-starter/src/main/java/org/apache/camel/component/facebook/springboot/FacebookComponentAutoConfiguration.java b/components-starter/camel-facebook-starter/src/main/java/org/apache/camel/component/facebook/springboot/FacebookComponentAutoConfiguration.java
index 369ee37..1fc3f79 100644
--- a/components-starter/camel-facebook-starter/src/main/java/org/apache/camel/component/facebook/springboot/FacebookComponentAutoConfiguration.java
+++ b/components-starter/camel-facebook-starter/src/main/java/org/apache/camel/component/facebook/springboot/FacebookComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.facebook.FacebookComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(FacebookComponentConfiguration.class)
+@Conditional(FacebookComponentAutoConfiguration.Condition.class)
public class FacebookComponentAutoConfiguration {
@Bean(name = "facebook-component")
@@ -69,4 +77,29 @@ public class FacebookComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.facebook");
+ if (isEnabled(conditionContext, "camel.component.facebook.",
+ 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/2f9a99cc/components-starter/camel-facebook-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-facebook-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-facebook-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..742833f
--- /dev/null
+++ b/components-starter/camel-facebook-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.facebook.enabled",
+ "description": "Enable facebook component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-flatpack-starter/src/main/java/org/apache/camel/dataformat/flatpack/springboot/FlatpackDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-flatpack-starter/src/main/java/org/apache/camel/dataformat/flatpack/springboot/FlatpackDataFormatAutoConfiguration.java b/components-starter/camel-flatpack-starter/src/main/java/org/apache/camel/dataformat/flatpack/springboot/FlatpackDataFormatAutoConfiguration.java
index ed63e2f..446f3c7 100644
--- a/components-starter/camel-flatpack-starter/src/main/java/org/apache/camel/dataformat/flatpack/springboot/FlatpackDataFormatAutoConfiguration.java
+++ b/components-starter/camel-flatpack-starter/src/main/java/org/apache/camel/dataformat/flatpack/springboot/FlatpackDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.flatpack.FlatpackDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(FlatpackDataFormatConfiguration.class)
+@Conditional(FlatpackDataFormatAutoConfiguration.Condition.class)
public class FlatpackDataFormatAutoConfiguration {
@Bean(name = "flatpack-dataformat")
@@ -52,4 +60,29 @@ public class FlatpackDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.flatpack");
+ if (isEnabled(conditionContext, "camel.dataformat.flatpack.",
+ 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/2f9a99cc/components-starter/camel-flatpack-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-flatpack-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-flatpack-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..e6d6277
--- /dev/null
+++ b/components-starter/camel-flatpack-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.flatpack.enabled",
+ "description": "Enable flatpack dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-flink-starter/src/main/java/org/apache/camel/component/flink/springboot/FlinkComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-flink-starter/src/main/java/org/apache/camel/component/flink/springboot/FlinkComponentAutoConfiguration.java b/components-starter/camel-flink-starter/src/main/java/org/apache/camel/component/flink/springboot/FlinkComponentAutoConfiguration.java
index 03ee5b1..9599519 100644
--- a/components-starter/camel-flink-starter/src/main/java/org/apache/camel/component/flink/springboot/FlinkComponentAutoConfiguration.java
+++ b/components-starter/camel-flink-starter/src/main/java/org/apache/camel/component/flink/springboot/FlinkComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.flink.FlinkComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(FlinkComponentConfiguration.class)
+@Conditional(FlinkComponentAutoConfiguration.Condition.class)
public class FlinkComponentAutoConfiguration {
@Bean(name = "flink-component")
@@ -68,4 +76,29 @@ public class FlinkComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.flink");
+ if (isEnabled(conditionContext, "camel.component.flink.",
+ 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/2f9a99cc/components-starter/camel-flink-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-flink-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-flink-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..e52c15c
--- /dev/null
+++ b/components-starter/camel-flink-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.flink.enabled",
+ "description": "Enable flink component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
[14/15] camel git commit: CAMEL-10552: regenerate spring boot
component starters
Posted by lb...@apache.org.
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-jt400-starter/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jt400-starter/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.java b/components-starter/camel-jt400-starter/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.java
index d8c2909..f946499 100644
--- a/components-starter/camel-jt400-starter/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.java
+++ b/components-starter/camel-jt400-starter/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(Jt400ComponentAutoConfiguration.Condition.class)
public class Jt400ComponentAutoConfiguration {
+ @Lazy
@Bean(name = "jt400-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(Jt400Component.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.java b/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.java
index dfc6101..b9cef11 100644
--- a/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.java
+++ b/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(KafkaComponentAutoConfiguration.Condition.class)
public class KafkaComponentAutoConfiguration {
+ @Lazy
@Bean(name = "kafka-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(KafkaComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-kestrel-starter/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-kestrel-starter/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.java b/components-starter/camel-kestrel-starter/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.java
index fa54651..3a57ca9 100644
--- a/components-starter/camel-kestrel-starter/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.java
+++ b/components-starter/camel-kestrel-starter/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(KestrelComponentAutoConfiguration.Condition.class)
public class KestrelComponentAutoConfiguration {
+ @Lazy
@Bean(name = "kestrel-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(KestrelComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-linkedin-starter/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-linkedin-starter/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.java b/components-starter/camel-linkedin-starter/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.java
index 519bd93..ace215a 100644
--- a/components-starter/camel-linkedin-starter/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.java
+++ b/components-starter/camel-linkedin-starter/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(LinkedInComponentAutoConfiguration.Condition.class)
public class LinkedInComponentAutoConfiguration {
+ @Lazy
@Bean(name = "linkedin-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(LinkedInComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-lucene-starter/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-lucene-starter/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.java b/components-starter/camel-lucene-starter/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.java
index 4319552..429e6d2 100644
--- a/components-starter/camel-lucene-starter/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.java
+++ b/components-starter/camel-lucene-starter/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(LuceneComponentAutoConfiguration.Condition.class)
public class LuceneComponentAutoConfiguration {
+ @Lazy
@Bean(name = "lucene-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(LuceneComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-lumberjack-starter/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-lumberjack-starter/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java b/components-starter/camel-lumberjack-starter/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java
index dc49691..d65e00e 100644
--- a/components-starter/camel-lumberjack-starter/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java
+++ b/components-starter/camel-lumberjack-starter/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(LumberjackComponentAutoConfiguration.Condition.class)
public class LumberjackComponentAutoConfiguration {
+ @Lazy
@Bean(name = "lumberjack-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(LumberjackComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.java b/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.java
index edcdf71..c4e9045 100644
--- a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.java
+++ b/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(MailComponentAutoConfiguration.Condition.class)
public class MailComponentAutoConfiguration {
+ @Lazy
@Bean(name = {"imap-component", "imaps-component", "pop3-component",
"pop3s-component", "smtp-component", "smtps-component"})
@ConditionalOnClass(CamelContext.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java b/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java
index 4fd4c48..544842b 100644
--- a/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java
+++ b/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(MetricsComponentAutoConfiguration.Condition.class)
public class MetricsComponentAutoConfiguration {
+ @Lazy
@Bean(name = "metrics-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(MetricsComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java b/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java
index 8d017ee..3ad54dd 100644
--- a/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java
+++ b/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(Mina2ComponentAutoConfiguration.Condition.class)
public class Mina2ComponentAutoConfiguration {
+ @Lazy
@Bean(name = "mina2-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(Mina2Component.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-mqtt-starter/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mqtt-starter/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.java b/components-starter/camel-mqtt-starter/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.java
index c22a6de..27fcda6 100644
--- a/components-starter/camel-mqtt-starter/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.java
+++ b/components-starter/camel-mqtt-starter/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(MQTTComponentAutoConfiguration.Condition.class)
public class MQTTComponentAutoConfiguration {
+ @Lazy
@Bean(name = "mqtt-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(MQTTComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-msv-starter/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-msv-starter/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java b/components-starter/camel-msv-starter/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java
index 5484fd4..61bbc3c 100644
--- a/components-starter/camel-msv-starter/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java
+++ b/components-starter/camel-msv-starter/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(MsvComponentAutoConfiguration.Condition.class)
public class MsvComponentAutoConfiguration {
+ @Lazy
@Bean(name = "msv-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(MsvComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-mustache-starter/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mustache-starter/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.java b/components-starter/camel-mustache-starter/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.java
index 35e3bdf..bd5514e 100644
--- a/components-starter/camel-mustache-starter/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.java
+++ b/components-starter/camel-mustache-starter/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(MustacheComponentAutoConfiguration.Condition.class)
public class MustacheComponentAutoConfiguration {
+ @Lazy
@Bean(name = "mustache-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(MustacheComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-mybatis-starter/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mybatis-starter/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.java b/components-starter/camel-mybatis-starter/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.java
index 499fe3f..5510ba4 100644
--- a/components-starter/camel-mybatis-starter/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.java
+++ b/components-starter/camel-mybatis-starter/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(MyBatisComponentAutoConfiguration.Condition.class)
public class MyBatisComponentAutoConfiguration {
+ @Lazy
@Bean(name = "mybatis-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(MyBatisComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.java b/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.java
index a0bd8ac..7c311d3 100644
--- a/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.java
+++ b/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(NagiosComponentAutoConfiguration.Condition.class)
public class NagiosComponentAutoConfiguration {
+ @Lazy
@Bean(name = "nagios-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(NagiosComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-netty-http-starter/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-netty-http-starter/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.java b/components-starter/camel-netty-http-starter/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.java
index e095e2e..2773535 100644
--- a/components-starter/camel-netty-http-starter/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.java
+++ b/components-starter/camel-netty-http-starter/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(NettyHttpComponentAutoConfiguration.Condition.class)
public class NettyHttpComponentAutoConfiguration {
+ @Lazy
@Bean(name = "netty-http-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(NettyHttpComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-netty-starter/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-netty-starter/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java b/components-starter/camel-netty-starter/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java
index e66636a..cc455bf 100644
--- a/components-starter/camel-netty-starter/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java
+++ b/components-starter/camel-netty-starter/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(NettyComponentAutoConfiguration.Condition.class)
public class NettyComponentAutoConfiguration {
+ @Lazy
@Bean(name = "netty-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(NettyComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-netty4-http-starter/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-netty4-http-starter/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java b/components-starter/camel-netty4-http-starter/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java
index 793cfb2..9de950c 100644
--- a/components-starter/camel-netty4-http-starter/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java
+++ b/components-starter/camel-netty4-http-starter/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(NettyHttpComponentAutoConfiguration.Condition.class)
public class NettyHttpComponentAutoConfiguration {
+ @Lazy
@Bean(name = "netty4-http-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(NettyHttpComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java b/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java
index e406d79..6c1e3dc 100644
--- a/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java
+++ b/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(NettyComponentAutoConfiguration.Condition.class)
public class NettyComponentAutoConfiguration {
+ @Lazy
@Bean(name = "netty4-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(NettyComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-olingo2-starter/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-olingo2-starter/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java b/components-starter/camel-olingo2-starter/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java
index adf4ca6..924fa8c 100644
--- a/components-starter/camel-olingo2-starter/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java
+++ b/components-starter/camel-olingo2-starter/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(Olingo2ComponentAutoConfiguration.Condition.class)
public class Olingo2ComponentAutoConfiguration {
+ @Lazy
@Bean(name = "olingo2-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(Olingo2Component.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-openshift-starter/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-openshift-starter/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java b/components-starter/camel-openshift-starter/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java
index a81ec4f..ed5d0e9 100644
--- a/components-starter/camel-openshift-starter/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java
+++ b/components-starter/camel-openshift-starter/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(OpenShiftComponentAutoConfiguration.Condition.class)
public class OpenShiftComponentAutoConfiguration {
+ @Lazy
@Bean(name = "openshift-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(OpenShiftComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-paho-starter/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-paho-starter/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java b/components-starter/camel-paho-starter/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java
index d161b7b..3bbcc9d 100644
--- a/components-starter/camel-paho-starter/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java
+++ b/components-starter/camel-paho-starter/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(PahoComponentAutoConfiguration.Condition.class)
public class PahoComponentAutoConfiguration {
+ @Lazy
@Bean(name = "paho-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(PahoComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-quartz2-starter/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-quartz2-starter/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java b/components-starter/camel-quartz2-starter/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java
index 0b42136..782eea9 100644
--- a/components-starter/camel-quartz2-starter/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java
+++ b/components-starter/camel-quartz2-starter/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(QuartzComponentAutoConfiguration.Condition.class)
public class QuartzComponentAutoConfiguration {
+ @Lazy
@Bean(name = "quartz2-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(QuartzComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java b/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java
index 5a2d5a3..a0cd5f7 100644
--- a/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java
+++ b/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(QuickfixjComponentAutoConfiguration.Condition.class)
public class QuickfixjComponentAutoConfiguration {
+ @Lazy
@Bean(name = "quickfix-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(QuickfixjComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-restlet-starter/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-restlet-starter/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java b/components-starter/camel-restlet-starter/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java
index c84a9e0..a917540 100644
--- a/components-starter/camel-restlet-starter/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java
+++ b/components-starter/camel-restlet-starter/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(RestletComponentAutoConfiguration.Condition.class)
public class RestletComponentAutoConfiguration {
+ @Lazy
@Bean(name = "restlet-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(RestletComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentAutoConfiguration.java b/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentAutoConfiguration.java
index d113921..21293d9 100644
--- a/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentAutoConfiguration.java
+++ b/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(SalesforceComponentAutoConfiguration.Condition.class)
public class SalesforceComponentAutoConfiguration {
+ @Lazy
@Bean(name = "salesforce-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SalesforceComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java b/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java
index 2836fb3..3ab366f 100644
--- a/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java
+++ b/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(XQueryComponentAutoConfiguration.Condition.class)
public class XQueryComponentAutoConfiguration {
+ @Lazy
@Bean(name = "xquery-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XQueryComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java b/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java
index 0bbbe8b..399b524 100644
--- a/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java
+++ b/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(ServiceNowComponentAutoConfiguration.Condition.class)
public class ServiceNowComponentAutoConfiguration {
+ @Lazy
@Bean(name = "servicenow-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ServiceNowComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-servlet-starter/src/main/java/org/apache/camel/component/servlet/springboot/ServletComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-servlet-starter/src/main/java/org/apache/camel/component/servlet/springboot/ServletComponentAutoConfiguration.java b/components-starter/camel-servlet-starter/src/main/java/org/apache/camel/component/servlet/springboot/ServletComponentAutoConfiguration.java
index 4d5a7fd..0f23b99 100644
--- a/components-starter/camel-servlet-starter/src/main/java/org/apache/camel/component/servlet/springboot/ServletComponentAutoConfiguration.java
+++ b/components-starter/camel-servlet-starter/src/main/java/org/apache/camel/component/servlet/springboot/ServletComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(ServletComponentAutoConfiguration.Condition.class)
public class ServletComponentAutoConfiguration {
+ @Lazy
@Bean(name = "servlet-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ServletComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java b/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java
index 10fd4c7..236b664 100644
--- a/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java
+++ b/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(SjmsBatchComponentAutoConfiguration.Condition.class)
public class SjmsBatchComponentAutoConfiguration {
+ @Lazy
@Bean(name = "sjms-batch-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SjmsBatchComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java b/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java
index 0079e89..f5a1fd7 100644
--- a/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java
+++ b/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(SjmsComponentAutoConfiguration.Condition.class)
public class SjmsComponentAutoConfiguration {
+ @Lazy
@Bean(name = "sjms-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SjmsComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java b/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java
index 3df2028..2f4582e 100644
--- a/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java
+++ b/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(SlackComponentAutoConfiguration.Condition.class)
public class SlackComponentAutoConfiguration {
+ @Lazy
@Bean(name = "slack-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SlackComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java b/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java
index 5b7f603..9802531 100644
--- a/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java
+++ b/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(SmppComponentAutoConfiguration.Condition.class)
public class SmppComponentAutoConfiguration {
+ @Lazy
@Bean(name = {"smpp-component", "smpps-component"})
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SmppComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java b/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java
index b50881d..45a3089 100644
--- a/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java
+++ b/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(SparkComponentAutoConfiguration.Condition.class)
public class SparkComponentAutoConfiguration {
+ @Lazy
@Bean(name = "spark-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SparkComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java b/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java
index 7d3a9a1..5b362a5 100644
--- a/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java
+++ b/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(SplunkComponentAutoConfiguration.Condition.class)
public class SplunkComponentAutoConfiguration {
+ @Lazy
@Bean(name = "splunk-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SplunkComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java b/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java
index c4fd2bf..60b4fe1 100644
--- a/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java
+++ b/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(SpringBatchComponentAutoConfiguration.Condition.class)
public class SpringBatchComponentAutoConfiguration {
+ @Lazy
@Bean(name = "spring-batch-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SpringBatchComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java b/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java
index 87e5f2f..220e27f 100644
--- a/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java
+++ b/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(EventComponentAutoConfiguration.Condition.class)
public class EventComponentAutoConfiguration {
+ @Lazy
@Bean(name = "spring-event-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(EventComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java b/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java
index 0877f15..27da90f 100644
--- a/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java
+++ b/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(SqlComponentAutoConfiguration.Condition.class)
public class SqlComponentAutoConfiguration {
+ @Lazy
@Bean(name = "sql-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SqlComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java b/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java
index 3613540..3f3fd98 100644
--- a/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java
+++ b/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(SqlStoredComponentAutoConfiguration.Condition.class)
public class SqlStoredComponentAutoConfiguration {
+ @Lazy
@Bean(name = "sql-stored-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SqlStoredComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java b/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java
index fae3611..b13aa19 100644
--- a/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java
+++ b/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(SshComponentAutoConfiguration.Condition.class)
public class SshComponentAutoConfiguration {
+ @Lazy
@Bean(name = "ssh-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SshComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java b/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java
index 282d21e..2d64bd6 100644
--- a/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java
+++ b/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(StompComponentAutoConfiguration.Condition.class)
public class StompComponentAutoConfiguration {
+ @Lazy
@Bean(name = "stomp-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(StompComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java b/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java
index 8ef29fb..73dcbbd 100644
--- a/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java
+++ b/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(TelegramComponentAutoConfiguration.Condition.class)
public class TelegramComponentAutoConfiguration {
+ @Lazy
@Bean(name = "telegram-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(TelegramComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java b/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java
index d1800bd..5bb2ae2 100644
--- a/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java
+++ b/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(TwitterComponentAutoConfiguration.Condition.class)
public class TwitterComponentAutoConfiguration {
+ @Lazy
@Bean(name = "twitter-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(TwitterComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java b/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java
index c06684b..e95918e 100644
--- a/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java
+++ b/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(UndertowComponentAutoConfiguration.Condition.class)
public class UndertowComponentAutoConfiguration {
+ @Lazy
@Bean(name = "undertow-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(UndertowComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java b/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java
index f441848..eff981d 100644
--- a/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java
+++ b/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(VelocityComponentAutoConfiguration.Condition.class)
public class VelocityComponentAutoConfiguration {
+ @Lazy
@Bean(name = "velocity-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(VelocityComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java b/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java
index c6edd79..f722f3d 100644
--- a/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java
+++ b/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(VertxComponentAutoConfiguration.Condition.class)
public class VertxComponentAutoConfiguration {
+ @Lazy
@Bean(name = "vertx-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(VertxComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java b/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java
index be00e12..88247d7 100644
--- a/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java
+++ b/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(WebsocketComponentAutoConfiguration.Condition.class)
public class WebsocketComponentAutoConfiguration {
+ @Lazy
@Bean(name = "websocket-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(WebsocketComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java
index 2ad5629..1433f02 100644
--- a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java
+++ b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(XmlSignatureComponentAutoConfiguration.Condition.class)
public class XmlSignatureComponentAutoConfiguration {
+ @Lazy
@Bean(name = "xmlsecurity-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XmlSignatureComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java b/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java
index b6c2159..7481ddd 100644
--- a/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java
+++ b/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(YammerComponentAutoConfiguration.Condition.class)
public class YammerComponentAutoConfiguration {
+ @Lazy
@Bean(name = "yammer-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(YammerComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java b/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java
index a904109..2e729af 100644
--- a/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java
+++ b/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(ZooKeeperComponentAutoConfiguration.Condition.class)
public class ZooKeeperComponentAutoConfiguration {
+ @Lazy
@Bean(name = "zookeeper-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ZooKeeperComponent.class)
[03/15] camel git commit: CAMEL-10550: re-generated starters
Posted by lb...@apache.org.
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java b/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java
index b703e06..0f3ab3b 100644
--- a/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java
+++ b/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.soap.SoapJaxbDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SoapJaxbDataFormatConfiguration.class)
+@Conditional(SoapJaxbDataFormatAutoConfiguration.Condition.class)
public class SoapJaxbDataFormatAutoConfiguration {
@Bean(name = "soapjaxb-dataformat")
@@ -52,4 +60,29 @@ public class SoapJaxbDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-soap-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-soap-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-soap-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..d4a6858
--- /dev/null
+++ b/components-starter/camel-soap-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.soapjaxb.enabled",
+ "description": "Enable soapjaxb dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java b/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java
index ba36376..b50881d 100644
--- a/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java
+++ b/components-starter/camel-spark-starter/src/main/java/org/apache/camel/component/spark/springboot/SparkComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.spark.SparkComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SparkComponentConfiguration.class)
+@Conditional(SparkComponentAutoConfiguration.Condition.class)
public class SparkComponentAutoConfiguration {
@Bean(name = "spark-component")
@@ -68,4 +76,29 @@ public class SparkComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-spark-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-spark-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-spark-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..1306ffb
--- /dev/null
+++ b/components-starter/camel-spark-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.spark.enabled",
+ "description": "Enable spark component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java b/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java
index cfff77c..7d3a9a1 100644
--- a/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java
+++ b/components-starter/camel-splunk-starter/src/main/java/org/apache/camel/component/splunk/springboot/SplunkComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.splunk.SplunkComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SplunkComponentConfiguration.class)
+@Conditional(SplunkComponentAutoConfiguration.Condition.class)
public class SplunkComponentAutoConfiguration {
@Bean(name = "splunk-component")
@@ -68,4 +76,29 @@ public class SplunkComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-splunk-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-splunk-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-splunk-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..04940ce
--- /dev/null
+++ b/components-starter/camel-splunk-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.splunk.enabled",
+ "description": "Enable splunk component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java b/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java
index b4ccffa..c4fd2bf 100644
--- a/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java
+++ b/components-starter/camel-spring-batch-starter/src/main/java/org/apache/camel/component/spring/batch/springboot/SpringBatchComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.spring.batch.SpringBatchComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SpringBatchComponentConfiguration.class)
+@Conditional(SpringBatchComponentAutoConfiguration.Condition.class)
public class SpringBatchComponentAutoConfiguration {
@Bean(name = "spring-batch-component")
@@ -69,4 +77,29 @@ public class SpringBatchComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-spring-batch-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-spring-batch-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-spring-batch-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..940db46
--- /dev/null
+++ b/components-starter/camel-spring-batch-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.spring-batch.enabled",
+ "description": "Enable spring-batch component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java b/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java
index db6e1c0..87e5f2f 100644
--- a/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java
+++ b/components-starter/camel-spring-starter/src/main/java/org/apache/camel/component/event/springboot/EventComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.event.EventComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(EventComponentConfiguration.class)
+@Conditional(EventComponentAutoConfiguration.Condition.class)
public class EventComponentAutoConfiguration {
@Bean(name = "spring-event-component")
@@ -68,4 +76,29 @@ public class EventComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java b/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
index 0d66bdf..efb9308 100644
--- a/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
+++ b/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.spel.SpelLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SpelLanguageConfiguration.class)
+@Conditional(SpelLanguageAutoConfiguration.Condition.class)
public class SpelLanguageAutoConfiguration {
@Bean(name = "spel-language")
@@ -51,4 +59,29 @@ public class SpelLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-spring-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-spring-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-spring-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..0a8267e
--- /dev/null
+++ b/components-starter/camel-spring-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,16 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.spring-event.enabled",
+ "description": "Enable spring-event component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.spel.enabled",
+ "description": "Enable spel language",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java b/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java
index 4281b7c..0877f15 100644
--- a/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java
+++ b/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.sql.SqlComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SqlComponentConfiguration.class)
+@Conditional(SqlComponentAutoConfiguration.Condition.class)
public class SqlComponentAutoConfiguration {
@Bean(name = "sql-component")
@@ -68,4 +76,29 @@ public class SqlComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java b/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java
index dc9da83..3613540 100644
--- a/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java
+++ b/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/stored/springboot/SqlStoredComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.sql.stored.SqlStoredComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SqlStoredComponentConfiguration.class)
+@Conditional(SqlStoredComponentAutoConfiguration.Condition.class)
public class SqlStoredComponentAutoConfiguration {
@Bean(name = "sql-stored-component")
@@ -69,4 +77,29 @@ public class SqlStoredComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-sql-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-sql-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-sql-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..02bf094
--- /dev/null
+++ b/components-starter/camel-sql-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,16 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.sql.enabled",
+ "description": "Enable sql component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.sql-stored.enabled",
+ "description": "Enable sql-stored component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java b/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java
index f2bead0..fae3611 100644
--- a/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java
+++ b/components-starter/camel-ssh-starter/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.ssh.SshComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SshComponentConfiguration.class)
+@Conditional(SshComponentAutoConfiguration.Condition.class)
public class SshComponentAutoConfiguration {
@Bean(name = "ssh-component")
@@ -68,4 +76,29 @@ public class SshComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-ssh-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-ssh-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-ssh-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..c95d896
--- /dev/null
+++ b/components-starter/camel-ssh-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.ssh.enabled",
+ "description": "Enable ssh component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java b/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java
index 16a87f4..282d21e 100644
--- a/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java
+++ b/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.stomp.StompComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(StompComponentConfiguration.class)
+@Conditional(StompComponentAutoConfiguration.Condition.class)
public class StompComponentAutoConfiguration {
@Bean(name = "stomp-component")
@@ -68,4 +76,29 @@ public class StompComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-stomp-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-stomp-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-stomp-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..7c38a1d
--- /dev/null
+++ b/components-starter/camel-stomp-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.stomp.enabled",
+ "description": "Enable stomp component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java b/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java
index 0e55b9f..563717a 100644
--- a/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java
+++ b/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.component.syslog.SyslogDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SyslogDataFormatConfiguration.class)
+@Conditional(SyslogDataFormatAutoConfiguration.Condition.class)
public class SyslogDataFormatAutoConfiguration {
@Bean(name = "syslog-dataformat")
@@ -52,4 +60,29 @@ public class SyslogDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-syslog-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-syslog-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-syslog-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..dbb9680
--- /dev/null
+++ b/components-starter/camel-syslog-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.syslog.enabled",
+ "description": "Enable syslog dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java b/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java
index 0e8c37b..00ce36e 100644
--- a/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java
+++ b/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.tagsoup.TidyMarkupDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(TidyMarkupDataFormatConfiguration.class)
+@Conditional(TidyMarkupDataFormatAutoConfiguration.Condition.class)
public class TidyMarkupDataFormatAutoConfiguration {
@Bean(name = "tidyMarkup-dataformat")
@@ -52,4 +60,29 @@ public class TidyMarkupDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-tagsoup-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-tagsoup-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-tagsoup-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..e610360
--- /dev/null
+++ b/components-starter/camel-tagsoup-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.tidymarkup.enabled",
+ "description": "Enable tidymarkup dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java b/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java
index 41ea373..976a6f1 100644
--- a/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java
+++ b/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.tarfile.TarFileDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(TarFileDataFormatConfiguration.class)
+@Conditional(TarFileDataFormatAutoConfiguration.Condition.class)
public class TarFileDataFormatAutoConfiguration {
@Bean(name = "tarfile-dataformat")
@@ -52,4 +60,29 @@ public class TarFileDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-tarfile-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-tarfile-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-tarfile-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..a3dc1b8
--- /dev/null
+++ b/components-starter/camel-tarfile-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.tarfile.enabled",
+ "description": "Enable tarfile dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java b/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java
index 4dba406..8ef29fb 100644
--- a/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java
+++ b/components-starter/camel-telegram-starter/src/main/java/org/apache/camel/component/telegram/springboot/TelegramComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.telegram.TelegramComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(TelegramComponentConfiguration.class)
+@Conditional(TelegramComponentAutoConfiguration.Condition.class)
public class TelegramComponentAutoConfiguration {
@Bean(name = "telegram-component")
@@ -69,4 +77,29 @@ public class TelegramComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-telegram-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-telegram-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-telegram-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..50e5600
--- /dev/null
+++ b/components-starter/camel-telegram-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.telegram.enabled",
+ "description": "Enable telegram component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java b/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java
index 1e63e96..d1800bd 100644
--- a/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java
+++ b/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.twitter.TwitterComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(TwitterComponentConfiguration.class)
+@Conditional(TwitterComponentAutoConfiguration.Condition.class)
public class TwitterComponentAutoConfiguration {
@Bean(name = "twitter-component")
@@ -69,4 +77,29 @@ public class TwitterComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-twitter-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-twitter-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-twitter-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..e73ba87
--- /dev/null
+++ b/components-starter/camel-twitter-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.twitter.enabled",
+ "description": "Enable twitter component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java b/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java
index 5af3cc4..c06684b 100644
--- a/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java
+++ b/components-starter/camel-undertow-starter/src/main/java/org/apache/camel/component/undertow/springboot/UndertowComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.undertow.UndertowComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(UndertowComponentConfiguration.class)
+@Conditional(UndertowComponentAutoConfiguration.Condition.class)
public class UndertowComponentAutoConfiguration {
@Bean(name = "undertow-component")
@@ -69,4 +77,29 @@ public class UndertowComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-undertow-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-undertow-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-undertow-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..1cf4333
--- /dev/null
+++ b/components-starter/camel-undertow-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.undertow.enabled",
+ "description": "Enable undertow component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java b/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java
index f79a404..82a5165 100644
--- a/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java
+++ b/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.univocity.UniVocityCsvDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(UniVocityCsvDataFormatConfiguration.class)
+@Conditional(UniVocityCsvDataFormatAutoConfiguration.Condition.class)
public class UniVocityCsvDataFormatAutoConfiguration {
@Bean(name = "univocity-csv-dataformat")
@@ -52,4 +60,29 @@ public class UniVocityCsvDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java b/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java
index 0ff29da..a91b731 100644
--- a/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java
+++ b/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.univocity.UniVocityFixedWidthDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(UniVocityFixedWidthDataFormatConfiguration.class)
+@Conditional(UniVocityFixedWidthDataFormatAutoConfiguration.Condition.class)
public class UniVocityFixedWidthDataFormatAutoConfiguration {
@Bean(name = "univocity-fixed-dataformat")
@@ -53,4 +61,29 @@ public class UniVocityFixedWidthDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java b/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java
index 051aa69..b8a8e7e 100644
--- a/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java
+++ b/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.univocity.UniVocityTsvDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(UniVocityTsvDataFormatConfiguration.class)
+@Conditional(UniVocityTsvDataFormatAutoConfiguration.Condition.class)
public class UniVocityTsvDataFormatAutoConfiguration {
@Bean(name = "univocity-tsv-dataformat")
@@ -52,4 +60,29 @@ public class UniVocityTsvDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-univocity-parsers-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-univocity-parsers-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-univocity-parsers-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..23cff69
--- /dev/null
+++ b/components-starter/camel-univocity-parsers-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,22 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.univocity-csv.enabled",
+ "description": "Enable univocity-csv dataformat",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.univocity-fixed.enabled",
+ "description": "Enable univocity-fixed dataformat",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.univocity-tsv.enabled",
+ "description": "Enable univocity-tsv dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java b/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java
index 46b851b..f441848 100644
--- a/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java
+++ b/components-starter/camel-velocity-starter/src/main/java/org/apache/camel/component/velocity/springboot/VelocityComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.velocity.VelocityComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(VelocityComponentConfiguration.class)
+@Conditional(VelocityComponentAutoConfiguration.Condition.class)
public class VelocityComponentAutoConfiguration {
@Bean(name = "velocity-component")
@@ -69,4 +77,29 @@ public class VelocityComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-velocity-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-velocity-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-velocity-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..d01eadc
--- /dev/null
+++ b/components-starter/camel-velocity-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.velocity.enabled",
+ "description": "Enable velocity component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
[12/15] camel git commit: CAMEL-10551: spring-boot: make auto
configured dataformats and languages prototype
Posted by lb...@apache.org.
CAMEL-10551: spring-boot: make auto configured dataformats and languages prototype
(cherry picked from commit 16a744317692bfac4c8fb3fce48d3f2cd0f91bbc)
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9ce3d180
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9ce3d180
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9ce3d180
Branch: refs/heads/camel-2.18.x
Commit: 9ce3d18015afd7143b403b505f2ecd8ccbdf6537
Parents: 2f9a99c
Author: lburgazzoli <lb...@gmail.com>
Authored: Tue Dec 6 16:25:04 2016 +0100
Committer: lburgazzoli <lb...@gmail.com>
Committed: Tue Dec 6 16:25:04 2016 +0100
----------------------------------------------------------------------
.../avro/springboot/AvroDataFormatAutoConfiguration.java | 2 ++
.../barcode/springboot/BarcodeDataFormatAutoConfiguration.java | 2 ++
.../base64/springboot/Base64DataFormatAutoConfiguration.java | 2 ++
.../beanio/springboot/BeanIODataFormatAutoConfiguration.java | 2 ++
.../bindy/csv/springboot/BindyCsvDataFormatAutoConfiguration.java | 2 ++
.../springboot/BindyFixedLengthDataFormatAutoConfiguration.java | 2 ++
.../springboot/BindyKeyValuePairDataFormatAutoConfiguration.java | 2 ++
.../boon/springboot/BoonDataFormatAutoConfiguration.java | 2 ++
.../castor/springboot/CastorDataFormatAutoConfiguration.java | 2 ++
.../camel/impl/springboot/GzipDataFormatAutoConfiguration.java | 2 ++
.../impl/springboot/SerializationDataFormatAutoConfiguration.java | 2 ++
.../camel/impl/springboot/StringDataFormatAutoConfiguration.java | 2 ++
.../camel/impl/springboot/ZipDataFormatAutoConfiguration.java | 2 ++
.../language/bean/springboot/BeanLanguageAutoConfiguration.java | 2 ++
.../constant/springboot/ConstantLanguageAutoConfiguration.java | 2 ++
.../header/springboot/HeaderLanguageAutoConfiguration.java | 2 ++
.../springboot/ExchangePropertyLanguageAutoConfiguration.java | 2 ++
.../language/ref/springboot/RefLanguageAutoConfiguration.java | 2 ++
.../language/simple/springboot/FileLanguageAutoConfiguration.java | 2 ++
.../simple/springboot/SimpleLanguageAutoConfiguration.java | 2 ++
.../tokenizer/springboot/TokenizeLanguageAutoConfiguration.java | 2 ++
.../springboot/XMLTokenizeLanguageAutoConfiguration.java | 2 ++
.../language/xpath/springboot/XPathLanguageAutoConfiguration.java | 2 ++
.../crypto/springboot/CryptoDataFormatAutoConfiguration.java | 2 ++
.../crypto/springboot/PGPDataFormatAutoConfiguration.java | 2 ++
.../dataformat/csv/springboot/CsvDataFormatAutoConfiguration.java | 2 ++
.../flatpack/springboot/FlatpackDataFormatAutoConfiguration.java | 2 ++
.../groovy/springboot/GroovyLanguageAutoConfiguration.java | 2 ++
.../gson/springboot/GsonDataFormatAutoConfiguration.java | 2 ++
.../hessian/springboot/HessianDataFormatAutoConfiguration.java | 2 ++
.../component/hl7/springboot/HL7DataFormatAutoConfiguration.java | 2 ++
.../component/hl7/springboot/TerserLanguageAutoConfiguration.java | 2 ++
.../ical/springboot/ICalDataFormatAutoConfiguration.java | 2 ++
.../jackson/springboot/JacksonDataFormatAutoConfiguration.java | 2 ++
.../springboot/JacksonXMLDataFormatAutoConfiguration.java | 2 ++
.../jaxb/springboot/JaxbDataFormatAutoConfiguration.java | 2 ++
.../jibx/springboot/JibxDataFormatAutoConfiguration.java | 2 ++
.../johnzon/springboot/JohnzonDataFormatAutoConfiguration.java | 2 ++
.../language/sql/springboot/SqlLanguageAutoConfiguration.java | 2 ++
.../jsonpath/springboot/JsonPathLanguageAutoConfiguration.java | 2 ++
.../language/juel/springboot/JuelLanguageAutoConfiguration.java | 2 ++
.../jxpath/springboot/JXPathLanguageAutoConfiguration.java | 2 ++
.../dataformat/lzf/springboot/LZFDataFormatAutoConfiguration.java | 2 ++
.../springboot/MimeMultipartDataFormatAutoConfiguration.java | 2 ++
.../language/mvel/springboot/MvelLanguageAutoConfiguration.java | 2 ++
.../language/ognl/springboot/OgnlLanguageAutoConfiguration.java | 2 ++
.../protobuf/springboot/ProtobufDataFormatAutoConfiguration.java | 2 ++
.../dataformat/rss/springboot/RssDataFormatAutoConfiguration.java | 2 ++
.../xquery/springboot/XQueryLanguageAutoConfiguration.java | 2 ++
.../script/springboot/JavaScriptLanguageAutoConfiguration.java | 2 ++
.../builder/script/springboot/PhpLanguageAutoConfiguration.java | 2 ++
.../script/springboot/PythonLanguageAutoConfiguration.java | 2 ++
.../builder/script/springboot/RubyLanguageAutoConfiguration.java | 2 ++
.../springboot/SnakeYAMLDataFormatAutoConfiguration.java | 2 ++
.../soap/springboot/SoapJaxbDataFormatAutoConfiguration.java | 2 ++
.../language/spel/springboot/SpelLanguageAutoConfiguration.java | 2 ++
.../syslog/springboot/SyslogDataFormatAutoConfiguration.java | 2 ++
.../tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java | 2 ++
.../tarfile/springboot/TarFileDataFormatAutoConfiguration.java | 2 ++
.../springboot/UniVocityCsvDataFormatAutoConfiguration.java | 2 ++
.../UniVocityFixedWidthDataFormatAutoConfiguration.java | 2 ++
.../springboot/UniVocityTsvDataFormatAutoConfiguration.java | 2 ++
.../xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java | 2 ++
.../xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java | 2 ++
.../xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java | 2 ++
.../springboot/XMLSecurityDataFormatAutoConfiguration.java | 2 ++
.../xstream/springboot/JsonDataFormatAutoConfiguration.java | 2 ++
.../xstream/springboot/XStreamDataFormatAutoConfiguration.java | 2 ++
.../zipfile/springboot/ZipFileDataFormatAutoConfiguration.java | 2 ++
.../camel/maven/packaging/SpringBootAutoConfigurationMojo.java | 3 +++
70 files changed, 141 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-avro-starter/src/main/java/org/apache/camel/dataformat/avro/springboot/AvroDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-avro-starter/src/main/java/org/apache/camel/dataformat/avro/springboot/AvroDataFormatAutoConfiguration.java b/components-starter/camel-avro-starter/src/main/java/org/apache/camel/dataformat/avro/springboot/AvroDataFormatAutoConfiguration.java
index b34249e..97e0c19 100644
--- a/components-starter/camel-avro-starter/src/main/java/org/apache/camel/dataformat/avro/springboot/AvroDataFormatAutoConfiguration.java
+++ b/components-starter/camel-avro-starter/src/main/java/org/apache/camel/dataformat/avro/springboot/AvroDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class AvroDataFormatAutoConfiguration {
@Bean(name = "avro-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(AvroDataFormat.class)
public AvroDataFormat configureAvroDataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-barcode-starter/src/main/java/org/apache/camel/dataformat/barcode/springboot/BarcodeDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-barcode-starter/src/main/java/org/apache/camel/dataformat/barcode/springboot/BarcodeDataFormatAutoConfiguration.java b/components-starter/camel-barcode-starter/src/main/java/org/apache/camel/dataformat/barcode/springboot/BarcodeDataFormatAutoConfiguration.java
index 3cb528f..728808a 100644
--- a/components-starter/camel-barcode-starter/src/main/java/org/apache/camel/dataformat/barcode/springboot/BarcodeDataFormatAutoConfiguration.java
+++ b/components-starter/camel-barcode-starter/src/main/java/org/apache/camel/dataformat/barcode/springboot/BarcodeDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class BarcodeDataFormatAutoConfiguration {
@Bean(name = "barcode-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BarcodeDataFormat.class)
public BarcodeDataFormat configureBarcodeDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-base64-starter/src/main/java/org/apache/camel/dataformat/base64/springboot/Base64DataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-base64-starter/src/main/java/org/apache/camel/dataformat/base64/springboot/Base64DataFormatAutoConfiguration.java b/components-starter/camel-base64-starter/src/main/java/org/apache/camel/dataformat/base64/springboot/Base64DataFormatAutoConfiguration.java
index 8b1639c..2b9e336 100644
--- a/components-starter/camel-base64-starter/src/main/java/org/apache/camel/dataformat/base64/springboot/Base64DataFormatAutoConfiguration.java
+++ b/components-starter/camel-base64-starter/src/main/java/org/apache/camel/dataformat/base64/springboot/Base64DataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class Base64DataFormatAutoConfiguration {
@Bean(name = "base64-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(Base64DataFormat.class)
public Base64DataFormat configureBase64DataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-beanio-starter/src/main/java/org/apache/camel/dataformat/beanio/springboot/BeanIODataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-beanio-starter/src/main/java/org/apache/camel/dataformat/beanio/springboot/BeanIODataFormatAutoConfiguration.java b/components-starter/camel-beanio-starter/src/main/java/org/apache/camel/dataformat/beanio/springboot/BeanIODataFormatAutoConfiguration.java
index b65aa7c..93be379 100644
--- a/components-starter/camel-beanio-starter/src/main/java/org/apache/camel/dataformat/beanio/springboot/BeanIODataFormatAutoConfiguration.java
+++ b/components-starter/camel-beanio-starter/src/main/java/org/apache/camel/dataformat/beanio/springboot/BeanIODataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class BeanIODataFormatAutoConfiguration {
@Bean(name = "beanio-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BeanIODataFormat.class)
public BeanIODataFormat configureBeanIODataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/csv/springboot/BindyCsvDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/csv/springboot/BindyCsvDataFormatAutoConfiguration.java b/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/csv/springboot/BindyCsvDataFormatAutoConfiguration.java
index e02c0d3..7e3a35d 100644
--- a/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/csv/springboot/BindyCsvDataFormatAutoConfiguration.java
+++ b/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/csv/springboot/BindyCsvDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class BindyCsvDataFormatAutoConfiguration {
@Bean(name = "bindy-csv-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BindyCsvDataFormat.class)
public BindyCsvDataFormat configureBindyCsvDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/fixed/springboot/BindyFixedLengthDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/fixed/springboot/BindyFixedLengthDataFormatAutoConfiguration.java b/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/fixed/springboot/BindyFixedLengthDataFormatAutoConfiguration.java
index 4f977a8..35059f2 100644
--- a/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/fixed/springboot/BindyFixedLengthDataFormatAutoConfiguration.java
+++ b/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/fixed/springboot/BindyFixedLengthDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class BindyFixedLengthDataFormatAutoConfiguration {
@Bean(name = "bindy-fixed-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BindyFixedLengthDataFormat.class)
public BindyFixedLengthDataFormat configureBindyFixedLengthDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/kvp/springboot/BindyKeyValuePairDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/kvp/springboot/BindyKeyValuePairDataFormatAutoConfiguration.java b/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/kvp/springboot/BindyKeyValuePairDataFormatAutoConfiguration.java
index f1d1fad..75c893a 100644
--- a/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/kvp/springboot/BindyKeyValuePairDataFormatAutoConfiguration.java
+++ b/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/kvp/springboot/BindyKeyValuePairDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class BindyKeyValuePairDataFormatAutoConfiguration {
@Bean(name = "bindy-kvp-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BindyKeyValuePairDataFormat.class)
public BindyKeyValuePairDataFormat configureBindyKeyValuePairDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-boon-starter/src/main/java/org/apache/camel/component/boon/springboot/BoonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-boon-starter/src/main/java/org/apache/camel/component/boon/springboot/BoonDataFormatAutoConfiguration.java b/components-starter/camel-boon-starter/src/main/java/org/apache/camel/component/boon/springboot/BoonDataFormatAutoConfiguration.java
index 92e449b..4a6ba47 100644
--- a/components-starter/camel-boon-starter/src/main/java/org/apache/camel/component/boon/springboot/BoonDataFormatAutoConfiguration.java
+++ b/components-starter/camel-boon-starter/src/main/java/org/apache/camel/component/boon/springboot/BoonDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class BoonDataFormatAutoConfiguration {
@Bean(name = "boon-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BoonDataFormat.class)
public BoonDataFormat configureBoonDataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-castor-starter/src/main/java/org/apache/camel/dataformat/castor/springboot/CastorDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-castor-starter/src/main/java/org/apache/camel/dataformat/castor/springboot/CastorDataFormatAutoConfiguration.java b/components-starter/camel-castor-starter/src/main/java/org/apache/camel/dataformat/castor/springboot/CastorDataFormatAutoConfiguration.java
index 311f1fd..64fde4f 100644
--- a/components-starter/camel-castor-starter/src/main/java/org/apache/camel/dataformat/castor/springboot/CastorDataFormatAutoConfiguration.java
+++ b/components-starter/camel-castor-starter/src/main/java/org/apache/camel/dataformat/castor/springboot/CastorDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class CastorDataFormatAutoConfiguration {
@Bean(name = "castor-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(CastorDataFormat.class)
public CastorDataFormat configureCastorDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatAutoConfiguration.java
index 828a263..495f5e0 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class GzipDataFormatAutoConfiguration {
@Bean(name = "gzip-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(GzipDataFormat.class)
public GzipDataFormat configureGzipDataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatAutoConfiguration.java
index 3481aed..c1fb1d7 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class SerializationDataFormatAutoConfiguration {
@Bean(name = "serialization-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SerializationDataFormat.class)
public SerializationDataFormat configureSerializationDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatAutoConfiguration.java
index f0d9e1a..27d8b8e 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class StringDataFormatAutoConfiguration {
@Bean(name = "string-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(StringDataFormat.class)
public StringDataFormat configureStringDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatAutoConfiguration.java
index 4f2ce8f..d35e906 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class ZipDataFormatAutoConfiguration {
@Bean(name = "zip-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ZipDataFormat.class)
public ZipDataFormat configureZipDataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java
index b71f03d..34f0c54 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class BeanLanguageAutoConfiguration {
@Bean(name = "bean-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BeanLanguage.class)
public BeanLanguage configureBeanLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.java
index b9d25a2..1ea4587 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class ConstantLanguageAutoConfiguration {
@Bean(name = "constant-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ConstantLanguage.class)
public ConstantLanguage configureConstantLanguage(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java
index 436636f..e2e98fc 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class HeaderLanguageAutoConfiguration {
@Bean(name = "header-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(HeaderLanguage.class)
public HeaderLanguage configureHeaderLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java
index fd2393a..a832384 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class ExchangePropertyLanguageAutoConfiguration {
@Bean(name = "exchangeProperty-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ExchangePropertyLanguage.class)
public ExchangePropertyLanguage configureExchangePropertyLanguage(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java
index e81adac..3ccdbba 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class RefLanguageAutoConfiguration {
@Bean(name = "ref-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(RefLanguage.class)
public RefLanguage configureRefLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java
index b27ffd7..43723f6 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class FileLanguageAutoConfiguration {
@Bean(name = "file-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(FileLanguage.class)
public FileLanguage configureFileLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java
index bb10195..6d8b8b2 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class SimpleLanguageAutoConfiguration {
@Bean(name = "simple-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SimpleLanguage.class)
public SimpleLanguage configureSimpleLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.java
index c470b8c..6fd7569 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class TokenizeLanguageAutoConfiguration {
@Bean(name = "tokenize-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(TokenizeLanguage.class)
public TokenizeLanguage configureTokenizeLanguage(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.java
index 149019d..172f15b 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class XMLTokenizeLanguageAutoConfiguration {
@Bean(name = "xtokenize-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XMLTokenizeLanguage.class)
public XMLTokenizeLanguage configureXMLTokenizeLanguage(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java
index 2589dc4..9635746 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class XPathLanguageAutoConfiguration {
@Bean(name = "xpath-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XPathLanguage.class)
public XPathLanguage configureXPathLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/CryptoDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/CryptoDataFormatAutoConfiguration.java b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/CryptoDataFormatAutoConfiguration.java
index 10d466e..e14f686 100644
--- a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/CryptoDataFormatAutoConfiguration.java
+++ b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/CryptoDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class CryptoDataFormatAutoConfiguration {
@Bean(name = "crypto-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(CryptoDataFormat.class)
public CryptoDataFormat configureCryptoDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/PGPDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/PGPDataFormatAutoConfiguration.java b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/PGPDataFormatAutoConfiguration.java
index c1f2174..8216411 100644
--- a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/PGPDataFormatAutoConfiguration.java
+++ b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/converter/crypto/springboot/PGPDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class PGPDataFormatAutoConfiguration {
@Bean(name = "pgp-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(PGPDataFormat.class)
public PGPDataFormat configurePGPDataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatAutoConfiguration.java b/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatAutoConfiguration.java
index 45b2793..2016232 100644
--- a/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatAutoConfiguration.java
+++ b/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class CsvDataFormatAutoConfiguration {
@Bean(name = "csv-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(CsvDataFormat.class)
public CsvDataFormat configureCsvDataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-flatpack-starter/src/main/java/org/apache/camel/dataformat/flatpack/springboot/FlatpackDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-flatpack-starter/src/main/java/org/apache/camel/dataformat/flatpack/springboot/FlatpackDataFormatAutoConfiguration.java b/components-starter/camel-flatpack-starter/src/main/java/org/apache/camel/dataformat/flatpack/springboot/FlatpackDataFormatAutoConfiguration.java
index 446f3c7..f21adce 100644
--- a/components-starter/camel-flatpack-starter/src/main/java/org/apache/camel/dataformat/flatpack/springboot/FlatpackDataFormatAutoConfiguration.java
+++ b/components-starter/camel-flatpack-starter/src/main/java/org/apache/camel/dataformat/flatpack/springboot/FlatpackDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class FlatpackDataFormatAutoConfiguration {
@Bean(name = "flatpack-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(FlatpackDataFormat.class)
public FlatpackDataFormat configureFlatpackDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-groovy-starter/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-groovy-starter/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java b/components-starter/camel-groovy-starter/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java
index 40a635c..f81169f 100644
--- a/components-starter/camel-groovy-starter/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java
+++ b/components-starter/camel-groovy-starter/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class GroovyLanguageAutoConfiguration {
@Bean(name = "groovy-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(GroovyLanguage.class)
public GroovyLanguage configureGroovyLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatAutoConfiguration.java b/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatAutoConfiguration.java
index 184074b..bc26db0 100644
--- a/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatAutoConfiguration.java
+++ b/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class GsonDataFormatAutoConfiguration {
@Bean(name = "json-gson-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(GsonDataFormat.class)
public GsonDataFormat configureGsonDataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-hessian-starter/src/main/java/org/apache/camel/dataformat/hessian/springboot/HessianDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hessian-starter/src/main/java/org/apache/camel/dataformat/hessian/springboot/HessianDataFormatAutoConfiguration.java b/components-starter/camel-hessian-starter/src/main/java/org/apache/camel/dataformat/hessian/springboot/HessianDataFormatAutoConfiguration.java
index 258d406..6883523 100644
--- a/components-starter/camel-hessian-starter/src/main/java/org/apache/camel/dataformat/hessian/springboot/HessianDataFormatAutoConfiguration.java
+++ b/components-starter/camel-hessian-starter/src/main/java/org/apache/camel/dataformat/hessian/springboot/HessianDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class HessianDataFormatAutoConfiguration {
@Bean(name = "hessian-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(HessianDataFormat.class)
public HessianDataFormat configureHessianDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/HL7DataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/HL7DataFormatAutoConfiguration.java b/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/HL7DataFormatAutoConfiguration.java
index 634b59a..e23c4ad 100644
--- a/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/HL7DataFormatAutoConfiguration.java
+++ b/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/HL7DataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class HL7DataFormatAutoConfiguration {
@Bean(name = "hl7-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(HL7DataFormat.class)
public HL7DataFormat configureHL7DataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java b/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java
index a3e80bd..7f68461 100644
--- a/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java
+++ b/components-starter/camel-hl7-starter/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class TerserLanguageAutoConfiguration {
@Bean(name = "terser-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(TerserLanguage.class)
public TerserLanguage configureTerserLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-ical-starter/src/main/java/org/apache/camel/component/ical/springboot/ICalDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ical-starter/src/main/java/org/apache/camel/component/ical/springboot/ICalDataFormatAutoConfiguration.java b/components-starter/camel-ical-starter/src/main/java/org/apache/camel/component/ical/springboot/ICalDataFormatAutoConfiguration.java
index a0795a1..7efcaec 100644
--- a/components-starter/camel-ical-starter/src/main/java/org/apache/camel/component/ical/springboot/ICalDataFormatAutoConfiguration.java
+++ b/components-starter/camel-ical-starter/src/main/java/org/apache/camel/component/ical/springboot/ICalDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class ICalDataFormatAutoConfiguration {
@Bean(name = "ical-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ICalDataFormat.class)
public ICalDataFormat configureICalDataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatAutoConfiguration.java b/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatAutoConfiguration.java
index 90b0cad..f7bc171 100644
--- a/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatAutoConfiguration.java
+++ b/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class JacksonDataFormatAutoConfiguration {
@Bean(name = "json-jackson-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JacksonDataFormat.class)
public JacksonDataFormat configureJacksonDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatAutoConfiguration.java b/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatAutoConfiguration.java
index e09a8c3..7ea8bea 100644
--- a/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatAutoConfiguration.java
+++ b/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class JacksonXMLDataFormatAutoConfiguration {
@Bean(name = "jacksonxml-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JacksonXMLDataFormat.class)
public JacksonXMLDataFormat configureJacksonXMLDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-jaxb-starter/src/main/java/org/apache/camel/converter/jaxb/springboot/JaxbDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jaxb-starter/src/main/java/org/apache/camel/converter/jaxb/springboot/JaxbDataFormatAutoConfiguration.java b/components-starter/camel-jaxb-starter/src/main/java/org/apache/camel/converter/jaxb/springboot/JaxbDataFormatAutoConfiguration.java
index ddc030a..eb3962b 100644
--- a/components-starter/camel-jaxb-starter/src/main/java/org/apache/camel/converter/jaxb/springboot/JaxbDataFormatAutoConfiguration.java
+++ b/components-starter/camel-jaxb-starter/src/main/java/org/apache/camel/converter/jaxb/springboot/JaxbDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class JaxbDataFormatAutoConfiguration {
@Bean(name = "jaxb-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JaxbDataFormat.class)
public JaxbDataFormat configureJaxbDataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-jibx-starter/src/main/java/org/apache/camel/dataformat/jibx/springboot/JibxDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jibx-starter/src/main/java/org/apache/camel/dataformat/jibx/springboot/JibxDataFormatAutoConfiguration.java b/components-starter/camel-jibx-starter/src/main/java/org/apache/camel/dataformat/jibx/springboot/JibxDataFormatAutoConfiguration.java
index a8ea649..e35833f 100644
--- a/components-starter/camel-jibx-starter/src/main/java/org/apache/camel/dataformat/jibx/springboot/JibxDataFormatAutoConfiguration.java
+++ b/components-starter/camel-jibx-starter/src/main/java/org/apache/camel/dataformat/jibx/springboot/JibxDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class JibxDataFormatAutoConfiguration {
@Bean(name = "jibx-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JibxDataFormat.class)
public JibxDataFormat configureJibxDataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatAutoConfiguration.java b/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatAutoConfiguration.java
index 9f9870c..89d9d57 100644
--- a/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatAutoConfiguration.java
+++ b/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class JohnzonDataFormatAutoConfiguration {
@Bean(name = "json-johnzon-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JohnzonDataFormat.class)
public JohnzonDataFormat configureJohnzonDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-josql-starter/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-josql-starter/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java b/components-starter/camel-josql-starter/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java
index 1a3bb93..12f6854 100644
--- a/components-starter/camel-josql-starter/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java
+++ b/components-starter/camel-josql-starter/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class SqlLanguageAutoConfiguration {
@Bean(name = "sql-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SqlLanguage.class)
public SqlLanguage configureSqlLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-jsonpath-starter/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jsonpath-starter/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.java b/components-starter/camel-jsonpath-starter/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.java
index 138adbd..f90f9c0 100644
--- a/components-starter/camel-jsonpath-starter/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.java
+++ b/components-starter/camel-jsonpath-starter/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class JsonPathLanguageAutoConfiguration {
@Bean(name = "jsonpath-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JsonPathLanguage.class)
public JsonPathLanguage configureJsonPathLanguage(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-juel-starter/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-juel-starter/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java b/components-starter/camel-juel-starter/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java
index 44383a2..151423d 100644
--- a/components-starter/camel-juel-starter/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java
+++ b/components-starter/camel-juel-starter/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class JuelLanguageAutoConfiguration {
@Bean(name = "el-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JuelLanguage.class)
public JuelLanguage configureJuelLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-jxpath-starter/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jxpath-starter/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java b/components-starter/camel-jxpath-starter/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java
index e48d684..c6f2a87 100644
--- a/components-starter/camel-jxpath-starter/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java
+++ b/components-starter/camel-jxpath-starter/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class JXPathLanguageAutoConfiguration {
@Bean(name = "jxpath-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JXPathLanguage.class)
public JXPathLanguage configureJXPathLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-lzf-starter/src/main/java/org/apache/camel/dataformat/lzf/springboot/LZFDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-lzf-starter/src/main/java/org/apache/camel/dataformat/lzf/springboot/LZFDataFormatAutoConfiguration.java b/components-starter/camel-lzf-starter/src/main/java/org/apache/camel/dataformat/lzf/springboot/LZFDataFormatAutoConfiguration.java
index b433c2b..13c788e 100644
--- a/components-starter/camel-lzf-starter/src/main/java/org/apache/camel/dataformat/lzf/springboot/LZFDataFormatAutoConfiguration.java
+++ b/components-starter/camel-lzf-starter/src/main/java/org/apache/camel/dataformat/lzf/springboot/LZFDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class LZFDataFormatAutoConfiguration {
@Bean(name = "lzf-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(LZFDataFormat.class)
public LZFDataFormat configureLZFDataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java b/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java
index e70c6f2..fdb61d0 100644
--- a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java
+++ b/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class MimeMultipartDataFormatAutoConfiguration {
@Bean(name = "mime-multipart-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(MimeMultipartDataFormat.class)
public MimeMultipartDataFormat configureMimeMultipartDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-mvel-starter/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mvel-starter/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java b/components-starter/camel-mvel-starter/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java
index 5993f02..73d9c45 100644
--- a/components-starter/camel-mvel-starter/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java
+++ b/components-starter/camel-mvel-starter/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class MvelLanguageAutoConfiguration {
@Bean(name = "mvel-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(MvelLanguage.class)
public MvelLanguage configureMvelLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-ognl-starter/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ognl-starter/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java b/components-starter/camel-ognl-starter/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java
index d516940..47c2e2f 100644
--- a/components-starter/camel-ognl-starter/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java
+++ b/components-starter/camel-ognl-starter/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class OgnlLanguageAutoConfiguration {
@Bean(name = "ognl-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(OgnlLanguage.class)
public OgnlLanguage configureOgnlLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatAutoConfiguration.java b/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatAutoConfiguration.java
index 5f2d91d..4433a76 100644
--- a/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatAutoConfiguration.java
+++ b/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class ProtobufDataFormatAutoConfiguration {
@Bean(name = "protobuf-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ProtobufDataFormat.class)
public ProtobufDataFormat configureProtobufDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-rss-starter/src/main/java/org/apache/camel/dataformat/rss/springboot/RssDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-rss-starter/src/main/java/org/apache/camel/dataformat/rss/springboot/RssDataFormatAutoConfiguration.java b/components-starter/camel-rss-starter/src/main/java/org/apache/camel/dataformat/rss/springboot/RssDataFormatAutoConfiguration.java
index 6f46566..5d1e46d 100644
--- a/components-starter/camel-rss-starter/src/main/java/org/apache/camel/dataformat/rss/springboot/RssDataFormatAutoConfiguration.java
+++ b/components-starter/camel-rss-starter/src/main/java/org/apache/camel/dataformat/rss/springboot/RssDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class RssDataFormatAutoConfiguration {
@Bean(name = "rss-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(RssDataFormat.class)
public RssDataFormat configureRssDataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java b/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
index 774352f..0790c75 100644
--- a/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
+++ b/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class XQueryLanguageAutoConfiguration {
@Bean(name = "xquery-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XQueryLanguage.class)
public XQueryLanguage configureXQueryLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
index e114a26..a323ab6 100644
--- a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
+++ b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class JavaScriptLanguageAutoConfiguration {
@Bean(name = "javaScript-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JavaScriptLanguage.class)
public JavaScriptLanguage configureJavaScriptLanguage(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
index 24667c0..f7e549e 100644
--- a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
+++ b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class PhpLanguageAutoConfiguration {
@Bean(name = "php-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(PhpLanguage.class)
public PhpLanguage configurePhpLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
index a8e80bc..d2b1ed6 100644
--- a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
+++ b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class PythonLanguageAutoConfiguration {
@Bean(name = "python-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(PythonLanguage.class)
public PythonLanguage configurePythonLanguage(CamelContext camelContext,
[05/15] camel git commit: CAMEL-10550: re-generated starters
Posted by lb...@apache.org.
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-lucene-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-lucene-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-lucene-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..b1a0931
--- /dev/null
+++ b/components-starter/camel-lucene-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.lucene.enabled",
+ "description": "Enable lucene component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-lumberjack-starter/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-lumberjack-starter/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java b/components-starter/camel-lumberjack-starter/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java
index 4018aab..dc49691 100644
--- a/components-starter/camel-lumberjack-starter/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java
+++ b/components-starter/camel-lumberjack-starter/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.lumberjack.LumberjackComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(LumberjackComponentConfiguration.class)
+@Conditional(LumberjackComponentAutoConfiguration.Condition.class)
public class LumberjackComponentAutoConfiguration {
@Bean(name = "lumberjack-component")
@@ -69,4 +77,29 @@ public class LumberjackComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.lumberjack");
+ if (isEnabled(conditionContext, "camel.component.lumberjack.",
+ 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/2f9a99cc/components-starter/camel-lumberjack-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-lumberjack-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-lumberjack-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..eaf6eec
--- /dev/null
+++ b/components-starter/camel-lumberjack-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.lumberjack.enabled",
+ "description": "Enable lumberjack component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-lzf-starter/src/main/java/org/apache/camel/dataformat/lzf/springboot/LZFDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-lzf-starter/src/main/java/org/apache/camel/dataformat/lzf/springboot/LZFDataFormatAutoConfiguration.java b/components-starter/camel-lzf-starter/src/main/java/org/apache/camel/dataformat/lzf/springboot/LZFDataFormatAutoConfiguration.java
index 46ba06a..b433c2b 100644
--- a/components-starter/camel-lzf-starter/src/main/java/org/apache/camel/dataformat/lzf/springboot/LZFDataFormatAutoConfiguration.java
+++ b/components-starter/camel-lzf-starter/src/main/java/org/apache/camel/dataformat/lzf/springboot/LZFDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.lzf.LZFDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(LZFDataFormatConfiguration.class)
+@Conditional(LZFDataFormatAutoConfiguration.Condition.class)
public class LZFDataFormatAutoConfiguration {
@Bean(name = "lzf-dataformat")
@@ -51,4 +59,29 @@ public class LZFDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.lzf");
+ if (isEnabled(conditionContext, "camel.dataformat.lzf.",
+ 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/2f9a99cc/components-starter/camel-lzf-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-lzf-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-lzf-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..c7931ff
--- /dev/null
+++ b/components-starter/camel-lzf-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.lzf.enabled",
+ "description": "Enable lzf dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.java b/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.java
index 488e31b..edcdf71 100644
--- a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.java
+++ b/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.mail.MailComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(MailComponentConfiguration.class)
+@Conditional(MailComponentAutoConfiguration.Condition.class)
public class MailComponentAutoConfiguration {
@Bean(name = {"imap-component", "imaps-component", "pop3-component",
@@ -69,4 +77,29 @@ public class MailComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.mail");
+ if (isEnabled(conditionContext, "camel.component.mail.",
+ 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/2f9a99cc/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java b/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java
index 5934038..e70c6f2 100644
--- a/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java
+++ b/components-starter/camel-mail-starter/src/main/java/org/apache/camel/dataformat/mime/multipart/springboot/MimeMultipartDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.mime.multipart.MimeMultipartDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(MimeMultipartDataFormatConfiguration.class)
+@Conditional(MimeMultipartDataFormatAutoConfiguration.Condition.class)
public class MimeMultipartDataFormatAutoConfiguration {
@Bean(name = "mime-multipart-dataformat")
@@ -53,4 +61,29 @@ public class MimeMultipartDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.mime-multipart");
+ if (isEnabled(conditionContext, "camel.dataformat.mime-multipart.",
+ 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/2f9a99cc/components-starter/camel-mail-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-mail-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-mail-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..4061c78
--- /dev/null
+++ b/components-starter/camel-mail-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,16 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.mail.enabled",
+ "description": "Enable mail component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.mime-multipart.enabled",
+ "description": "Enable mime-multipart dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java b/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java
index 475d9fe..4fd4c48 100644
--- a/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java
+++ b/components-starter/camel-metrics-starter/src/main/java/org/apache/camel/component/metrics/springboot/MetricsComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.metrics.MetricsComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(MetricsComponentConfiguration.class)
+@Conditional(MetricsComponentAutoConfiguration.Condition.class)
public class MetricsComponentAutoConfiguration {
@Bean(name = "metrics-component")
@@ -69,4 +77,29 @@ public class MetricsComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.metrics");
+ if (isEnabled(conditionContext, "camel.component.metrics.",
+ 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/2f9a99cc/components-starter/camel-metrics-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-metrics-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-metrics-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..ed3fb2c
--- /dev/null
+++ b/components-starter/camel-metrics-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.metrics.enabled",
+ "description": "Enable metrics component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java b/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java
index 7738c08..8d017ee 100644
--- a/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java
+++ b/components-starter/camel-mina2-starter/src/main/java/org/apache/camel/component/mina2/springboot/Mina2ComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.mina2.Mina2Component;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(Mina2ComponentConfiguration.class)
+@Conditional(Mina2ComponentAutoConfiguration.Condition.class)
public class Mina2ComponentAutoConfiguration {
@Bean(name = "mina2-component")
@@ -68,4 +76,29 @@ public class Mina2ComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.mina2");
+ if (isEnabled(conditionContext, "camel.component.mina2.",
+ 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/2f9a99cc/components-starter/camel-mina2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-mina2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-mina2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..7456aef
--- /dev/null
+++ b/components-starter/camel-mina2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.mina2.enabled",
+ "description": "Enable mina2 component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-mqtt-starter/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mqtt-starter/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.java b/components-starter/camel-mqtt-starter/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.java
index b879db6..c22a6de 100644
--- a/components-starter/camel-mqtt-starter/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.java
+++ b/components-starter/camel-mqtt-starter/src/main/java/org/apache/camel/component/mqtt/springboot/MQTTComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.mqtt.MQTTComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(MQTTComponentConfiguration.class)
+@Conditional(MQTTComponentAutoConfiguration.Condition.class)
public class MQTTComponentAutoConfiguration {
@Bean(name = "mqtt-component")
@@ -68,4 +76,29 @@ public class MQTTComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.mqtt");
+ if (isEnabled(conditionContext, "camel.component.mqtt.",
+ 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/2f9a99cc/components-starter/camel-mqtt-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-mqtt-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-mqtt-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..f346f35
--- /dev/null
+++ b/components-starter/camel-mqtt-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.mqtt.enabled",
+ "description": "Enable mqtt component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-msv-starter/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-msv-starter/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java b/components-starter/camel-msv-starter/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java
index 760879e..5484fd4 100644
--- a/components-starter/camel-msv-starter/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java
+++ b/components-starter/camel-msv-starter/src/main/java/org/apache/camel/component/validator/msv/springboot/MsvComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.validator.msv.MsvComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(MsvComponentConfiguration.class)
+@Conditional(MsvComponentAutoConfiguration.Condition.class)
public class MsvComponentAutoConfiguration {
@Bean(name = "msv-component")
@@ -68,4 +76,29 @@ public class MsvComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.msv");
+ if (isEnabled(conditionContext, "camel.component.msv.",
+ 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/2f9a99cc/components-starter/camel-msv-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-msv-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-msv-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..b860747
--- /dev/null
+++ b/components-starter/camel-msv-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.msv.enabled",
+ "description": "Enable msv component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-mustache-starter/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mustache-starter/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.java b/components-starter/camel-mustache-starter/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.java
index a33cb1c..35e3bdf 100644
--- a/components-starter/camel-mustache-starter/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.java
+++ b/components-starter/camel-mustache-starter/src/main/java/org/apache/camel/component/mustache/springboot/MustacheComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.mustache.MustacheComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(MustacheComponentConfiguration.class)
+@Conditional(MustacheComponentAutoConfiguration.Condition.class)
public class MustacheComponentAutoConfiguration {
@Bean(name = "mustache-component")
@@ -69,4 +77,29 @@ public class MustacheComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.mustache");
+ if (isEnabled(conditionContext, "camel.component.mustache.",
+ 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/2f9a99cc/components-starter/camel-mustache-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-mustache-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-mustache-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..1dee159
--- /dev/null
+++ b/components-starter/camel-mustache-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.mustache.enabled",
+ "description": "Enable mustache component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-mvel-starter/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mvel-starter/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java b/components-starter/camel-mvel-starter/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java
index caffb48..5993f02 100644
--- a/components-starter/camel-mvel-starter/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java
+++ b/components-starter/camel-mvel-starter/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.mvel.MvelLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(MvelLanguageConfiguration.class)
+@Conditional(MvelLanguageAutoConfiguration.Condition.class)
public class MvelLanguageAutoConfiguration {
@Bean(name = "mvel-language")
@@ -51,4 +59,29 @@ public class MvelLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.mvel");
+ if (isEnabled(conditionContext, "camel.language.mvel.",
+ 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/2f9a99cc/components-starter/camel-mvel-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-mvel-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-mvel-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..6f58c51
--- /dev/null
+++ b/components-starter/camel-mvel-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.language.mvel.enabled",
+ "description": "Enable mvel language",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-mybatis-starter/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-mybatis-starter/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.java b/components-starter/camel-mybatis-starter/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.java
index 9be5da8..499fe3f 100644
--- a/components-starter/camel-mybatis-starter/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.java
+++ b/components-starter/camel-mybatis-starter/src/main/java/org/apache/camel/component/mybatis/springboot/MyBatisComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.mybatis.MyBatisComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(MyBatisComponentConfiguration.class)
+@Conditional(MyBatisComponentAutoConfiguration.Condition.class)
public class MyBatisComponentAutoConfiguration {
@Bean(name = "mybatis-component")
@@ -69,4 +77,29 @@ public class MyBatisComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.mybatis");
+ if (isEnabled(conditionContext, "camel.component.mybatis.",
+ 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/2f9a99cc/components-starter/camel-mybatis-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-mybatis-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-mybatis-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..e53de0c
--- /dev/null
+++ b/components-starter/camel-mybatis-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.mybatis.enabled",
+ "description": "Enable mybatis component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.java b/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.java
index 6021d12..a0bd8ac 100644
--- a/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.java
+++ b/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.nagios.NagiosComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(NagiosComponentConfiguration.class)
+@Conditional(NagiosComponentAutoConfiguration.Condition.class)
public class NagiosComponentAutoConfiguration {
@Bean(name = "nagios-component")
@@ -68,4 +76,29 @@ public class NagiosComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.nagios");
+ if (isEnabled(conditionContext, "camel.component.nagios.",
+ 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/2f9a99cc/components-starter/camel-nagios-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-nagios-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-nagios-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..d317043
--- /dev/null
+++ b/components-starter/camel-nagios-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.nagios.enabled",
+ "description": "Enable nagios component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-netty-http-starter/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-netty-http-starter/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.java b/components-starter/camel-netty-http-starter/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.java
index cf7f6f6..e095e2e 100644
--- a/components-starter/camel-netty-http-starter/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.java
+++ b/components-starter/camel-netty-http-starter/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.netty.http.NettyHttpComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(NettyHttpComponentConfiguration.class)
+@Conditional(NettyHttpComponentAutoConfiguration.Condition.class)
public class NettyHttpComponentAutoConfiguration {
@Bean(name = "netty-http-component")
@@ -69,4 +77,29 @@ public class NettyHttpComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.netty-http");
+ if (isEnabled(conditionContext, "camel.component.netty-http.",
+ 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/2f9a99cc/components-starter/camel-netty-http-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-netty-http-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-netty-http-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..4b064ba
--- /dev/null
+++ b/components-starter/camel-netty-http-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.netty-http.enabled",
+ "description": "Enable netty-http component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-netty-starter/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-netty-starter/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java b/components-starter/camel-netty-starter/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java
index 6aa5c7e..e66636a 100644
--- a/components-starter/camel-netty-starter/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java
+++ b/components-starter/camel-netty-starter/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.netty.NettyComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(NettyComponentConfiguration.class)
+@Conditional(NettyComponentAutoConfiguration.Condition.class)
public class NettyComponentAutoConfiguration {
@Bean(name = "netty-component")
@@ -68,4 +76,29 @@ public class NettyComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.netty");
+ if (isEnabled(conditionContext, "camel.component.netty.",
+ 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/2f9a99cc/components-starter/camel-netty-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-netty-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-netty-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..4450826
--- /dev/null
+++ b/components-starter/camel-netty-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.netty.enabled",
+ "description": "Enable netty component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-netty4-http-starter/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-netty4-http-starter/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java b/components-starter/camel-netty4-http-starter/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java
index e79ff45..793cfb2 100644
--- a/components-starter/camel-netty4-http-starter/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java
+++ b/components-starter/camel-netty4-http-starter/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.netty4.http.NettyHttpComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(NettyHttpComponentConfiguration.class)
+@Conditional(NettyHttpComponentAutoConfiguration.Condition.class)
public class NettyHttpComponentAutoConfiguration {
@Bean(name = "netty4-http-component")
@@ -69,4 +77,29 @@ public class NettyHttpComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.netty4-http");
+ if (isEnabled(conditionContext, "camel.component.netty4-http.",
+ 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/2f9a99cc/components-starter/camel-netty4-http-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-netty4-http-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-netty4-http-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..5dd8031
--- /dev/null
+++ b/components-starter/camel-netty4-http-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.netty4-http.enabled",
+ "description": "Enable netty4-http component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java b/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java
index 532b578..e406d79 100644
--- a/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java
+++ b/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.netty4.NettyComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(NettyComponentConfiguration.class)
+@Conditional(NettyComponentAutoConfiguration.Condition.class)
public class NettyComponentAutoConfiguration {
@Bean(name = "netty4-component")
@@ -68,4 +76,29 @@ public class NettyComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.netty4");
+ if (isEnabled(conditionContext, "camel.component.netty4.",
+ 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/2f9a99cc/components-starter/camel-netty4-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-netty4-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-netty4-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..52c632e
--- /dev/null
+++ b/components-starter/camel-netty4-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.netty4.enabled",
+ "description": "Enable netty4 component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-ognl-starter/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ognl-starter/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java b/components-starter/camel-ognl-starter/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java
index d57b797..d516940 100644
--- a/components-starter/camel-ognl-starter/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java
+++ b/components-starter/camel-ognl-starter/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.ognl.OgnlLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(OgnlLanguageConfiguration.class)
+@Conditional(OgnlLanguageAutoConfiguration.Condition.class)
public class OgnlLanguageAutoConfiguration {
@Bean(name = "ognl-language")
@@ -51,4 +59,29 @@ public class OgnlLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.ognl");
+ if (isEnabled(conditionContext, "camel.language.ognl.",
+ 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/2f9a99cc/components-starter/camel-ognl-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-ognl-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-ognl-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..5dcceee
--- /dev/null
+++ b/components-starter/camel-ognl-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.language.ognl.enabled",
+ "description": "Enable ognl language",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-olingo2-starter/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-olingo2-starter/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java b/components-starter/camel-olingo2-starter/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java
index 3771b8a..adf4ca6 100644
--- a/components-starter/camel-olingo2-starter/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java
+++ b/components-starter/camel-olingo2-starter/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.olingo2.Olingo2Component;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(Olingo2ComponentConfiguration.class)
+@Conditional(Olingo2ComponentAutoConfiguration.Condition.class)
public class Olingo2ComponentAutoConfiguration {
@Bean(name = "olingo2-component")
@@ -69,4 +77,29 @@ public class Olingo2ComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.olingo2");
+ if (isEnabled(conditionContext, "camel.component.olingo2.",
+ 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/2f9a99cc/components-starter/camel-olingo2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-olingo2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-olingo2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..2c80c5d
--- /dev/null
+++ b/components-starter/camel-olingo2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.olingo2.enabled",
+ "description": "Enable olingo2 component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-openshift-starter/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-openshift-starter/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java b/components-starter/camel-openshift-starter/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java
index 2c0ae0d..a81ec4f 100644
--- a/components-starter/camel-openshift-starter/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java
+++ b/components-starter/camel-openshift-starter/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.openshift.OpenShiftComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(OpenShiftComponentConfiguration.class)
+@Conditional(OpenShiftComponentAutoConfiguration.Condition.class)
public class OpenShiftComponentAutoConfiguration {
@Bean(name = "openshift-component")
@@ -69,4 +77,29 @@ public class OpenShiftComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.openshift");
+ if (isEnabled(conditionContext, "camel.component.openshift.",
+ 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/2f9a99cc/components-starter/camel-openshift-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-openshift-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-openshift-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..a1cfc01
--- /dev/null
+++ b/components-starter/camel-openshift-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.openshift.enabled",
+ "description": "Enable openshift component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
[04/15] camel git commit: CAMEL-10550: re-generated starters
Posted by lb...@apache.org.
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-paho-starter/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-paho-starter/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java b/components-starter/camel-paho-starter/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java
index 59c826c..d161b7b 100644
--- a/components-starter/camel-paho-starter/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java
+++ b/components-starter/camel-paho-starter/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.paho.PahoComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(PahoComponentConfiguration.class)
+@Conditional(PahoComponentAutoConfiguration.Condition.class)
public class PahoComponentAutoConfiguration {
@Bean(name = "paho-component")
@@ -68,4 +76,29 @@ public class PahoComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.paho");
+ if (isEnabled(conditionContext, "camel.component.paho.",
+ 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/2f9a99cc/components-starter/camel-paho-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-paho-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-paho-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..8bb823f
--- /dev/null
+++ b/components-starter/camel-paho-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.paho.enabled",
+ "description": "Enable paho component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatAutoConfiguration.java b/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatAutoConfiguration.java
index 407e2b8..5f2d91d 100644
--- a/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatAutoConfiguration.java
+++ b/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.protobuf.ProtobufDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ProtobufDataFormatConfiguration.class)
+@Conditional(ProtobufDataFormatAutoConfiguration.Condition.class)
public class ProtobufDataFormatAutoConfiguration {
@Bean(name = "protobuf-dataformat")
@@ -52,4 +60,29 @@ public class ProtobufDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.protobuf");
+ if (isEnabled(conditionContext, "camel.dataformat.protobuf.",
+ 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/2f9a99cc/components-starter/camel-protobuf-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-protobuf-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-protobuf-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..5dbd613
--- /dev/null
+++ b/components-starter/camel-protobuf-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.protobuf.enabled",
+ "description": "Enable protobuf dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-quartz2-starter/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-quartz2-starter/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java b/components-starter/camel-quartz2-starter/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java
index 79dae37..0b42136 100644
--- a/components-starter/camel-quartz2-starter/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java
+++ b/components-starter/camel-quartz2-starter/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.quartz2.QuartzComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(QuartzComponentConfiguration.class)
+@Conditional(QuartzComponentAutoConfiguration.Condition.class)
public class QuartzComponentAutoConfiguration {
@Bean(name = "quartz2-component")
@@ -68,4 +76,29 @@ public class QuartzComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.quartz2");
+ if (isEnabled(conditionContext, "camel.component.quartz2.",
+ 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/2f9a99cc/components-starter/camel-quartz2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-quartz2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-quartz2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..cd6b5fe
--- /dev/null
+++ b/components-starter/camel-quartz2-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.quartz2.enabled",
+ "description": "Enable quartz2 component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java b/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java
index b644970..5a2d5a3 100644
--- a/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java
+++ b/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.quickfixj.QuickfixjComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(QuickfixjComponentConfiguration.class)
+@Conditional(QuickfixjComponentAutoConfiguration.Condition.class)
public class QuickfixjComponentAutoConfiguration {
@Bean(name = "quickfix-component")
@@ -69,4 +77,29 @@ public class QuickfixjComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.quickfix");
+ if (isEnabled(conditionContext, "camel.component.quickfix.",
+ 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/2f9a99cc/components-starter/camel-quickfix-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-quickfix-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-quickfix-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..b0ad7a6
--- /dev/null
+++ b/components-starter/camel-quickfix-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.quickfix.enabled",
+ "description": "Enable quickfix component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-restlet-starter/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-restlet-starter/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java b/components-starter/camel-restlet-starter/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java
index e35c860..c84a9e0 100644
--- a/components-starter/camel-restlet-starter/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java
+++ b/components-starter/camel-restlet-starter/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.restlet.RestletComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(RestletComponentConfiguration.class)
+@Conditional(RestletComponentAutoConfiguration.Condition.class)
public class RestletComponentAutoConfiguration {
@Bean(name = "restlet-component")
@@ -69,4 +77,29 @@ public class RestletComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.restlet");
+ if (isEnabled(conditionContext, "camel.component.restlet.",
+ 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/2f9a99cc/components-starter/camel-restlet-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-restlet-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-restlet-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..5759668
--- /dev/null
+++ b/components-starter/camel-restlet-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.restlet.enabled",
+ "description": "Enable restlet component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-rss-starter/src/main/java/org/apache/camel/dataformat/rss/springboot/RssDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-rss-starter/src/main/java/org/apache/camel/dataformat/rss/springboot/RssDataFormatAutoConfiguration.java b/components-starter/camel-rss-starter/src/main/java/org/apache/camel/dataformat/rss/springboot/RssDataFormatAutoConfiguration.java
index 189248a..6f46566 100644
--- a/components-starter/camel-rss-starter/src/main/java/org/apache/camel/dataformat/rss/springboot/RssDataFormatAutoConfiguration.java
+++ b/components-starter/camel-rss-starter/src/main/java/org/apache/camel/dataformat/rss/springboot/RssDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.rss.RssDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(RssDataFormatConfiguration.class)
+@Conditional(RssDataFormatAutoConfiguration.Condition.class)
public class RssDataFormatAutoConfiguration {
@Bean(name = "rss-dataformat")
@@ -51,4 +59,29 @@ public class RssDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.rss");
+ if (isEnabled(conditionContext, "camel.dataformat.rss.",
+ 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/2f9a99cc/components-starter/camel-rss-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-rss-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-rss-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..f4fefdb
--- /dev/null
+++ b/components-starter/camel-rss-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.rss.enabled",
+ "description": "Enable rss dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentAutoConfiguration.java b/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentAutoConfiguration.java
index 04184fe..d113921 100644
--- a/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentAutoConfiguration.java
+++ b/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.salesforce.SalesforceComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SalesforceComponentConfiguration.class)
+@Conditional(SalesforceComponentAutoConfiguration.Condition.class)
public class SalesforceComponentAutoConfiguration {
@Bean(name = "salesforce-component")
@@ -69,4 +77,29 @@ public class SalesforceComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.salesforce");
+ if (isEnabled(conditionContext, "camel.component.salesforce.",
+ 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/2f9a99cc/components-starter/camel-salesforce-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-salesforce-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-salesforce-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..6a94b50
--- /dev/null
+++ b/components-starter/camel-salesforce-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.salesforce.enabled",
+ "description": "Enable salesforce component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java b/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java
index 7dc5adc..2836fb3 100644
--- a/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java
+++ b/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/component/xquery/springboot/XQueryComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.xquery.XQueryComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(XQueryComponentConfiguration.class)
+@Conditional(XQueryComponentAutoConfiguration.Condition.class)
public class XQueryComponentAutoConfiguration {
@Bean(name = "xquery-component")
@@ -68,4 +76,29 @@ public class XQueryComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java b/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
index b0eac0c..774352f 100644
--- a/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
+++ b/components-starter/camel-saxon-starter/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.xquery.XQueryLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(XQueryLanguageConfiguration.class)
+@Conditional(XQueryLanguageAutoConfiguration.Condition.class)
public class XQueryLanguageAutoConfiguration {
@Bean(name = "xquery-language")
@@ -51,4 +59,29 @@ public class XQueryLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-saxon-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-saxon-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-saxon-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..c3b061e
--- /dev/null
+++ b/components-starter/camel-saxon-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,16 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.xquery.enabled",
+ "description": "Enable xquery component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.xquery.enabled",
+ "description": "Enable xquery language",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
index 7462a2e..e114a26 100644
--- a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
+++ b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.builder.script.JavaScriptLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JavaScriptLanguageConfiguration.class)
+@Conditional(JavaScriptLanguageAutoConfiguration.Condition.class)
public class JavaScriptLanguageAutoConfiguration {
@Bean(name = "javaScript-language")
@@ -52,4 +60,29 @@ public class JavaScriptLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
index e5c520ed..24667c0 100644
--- a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
+++ b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.builder.script.PhpLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(PhpLanguageConfiguration.class)
+@Conditional(PhpLanguageAutoConfiguration.Condition.class)
public class PhpLanguageAutoConfiguration {
@Bean(name = "php-language")
@@ -51,4 +59,28 @@ public class PhpLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
index afe86e4..a8e80bc 100644
--- a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
+++ b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.builder.script.PythonLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(PythonLanguageConfiguration.class)
+@Conditional(PythonLanguageAutoConfiguration.Condition.class)
public class PythonLanguageAutoConfiguration {
@Bean(name = "python-language")
@@ -51,4 +59,29 @@ public class PythonLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
index ce868a9..83dc340 100644
--- a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
+++ b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.builder.script.RubyLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(RubyLanguageConfiguration.class)
+@Conditional(RubyLanguageAutoConfiguration.Condition.class)
public class RubyLanguageAutoConfiguration {
@Bean(name = "ruby-language")
@@ -51,4 +59,29 @@ public class RubyLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-script-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-script-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-script-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..bc5850e
--- /dev/null
+++ b/components-starter/camel-script-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,28 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.language.javascript.enabled",
+ "description": "Enable javascript language",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.python.enabled",
+ "description": "Enable python language",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.php.enabled",
+ "description": "Enable php language",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.language.ruby.enabled",
+ "description": "Enable ruby language",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java b/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java
index 5d9fde7..0bbbe8b 100644
--- a/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java
+++ b/components-starter/camel-servicenow-starter/src/main/java/org/apache/camel/component/servicenow/springboot/ServiceNowComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.servicenow.ServiceNowComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ServiceNowComponentConfiguration.class)
+@Conditional(ServiceNowComponentAutoConfiguration.Condition.class)
public class ServiceNowComponentAutoConfiguration {
@Bean(name = "servicenow-component")
@@ -69,4 +77,29 @@ public class ServiceNowComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-servicenow-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-servicenow-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-servicenow-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..673a900
--- /dev/null
+++ b/components-starter/camel-servicenow-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.servicenow.enabled",
+ "description": "Enable servicenow component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-servlet-starter/src/main/java/org/apache/camel/component/servlet/springboot/ServletComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-servlet-starter/src/main/java/org/apache/camel/component/servlet/springboot/ServletComponentAutoConfiguration.java b/components-starter/camel-servlet-starter/src/main/java/org/apache/camel/component/servlet/springboot/ServletComponentAutoConfiguration.java
index 4744f3d..4d5a7fd 100644
--- a/components-starter/camel-servlet-starter/src/main/java/org/apache/camel/component/servlet/springboot/ServletComponentAutoConfiguration.java
+++ b/components-starter/camel-servlet-starter/src/main/java/org/apache/camel/component/servlet/springboot/ServletComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.servlet.ServletComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ServletComponentConfiguration.class)
+@Conditional(ServletComponentAutoConfiguration.Condition.class)
public class ServletComponentAutoConfiguration {
@Bean(name = "servlet-component")
@@ -69,4 +77,29 @@ public class ServletComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.servlet");
+ if (isEnabled(conditionContext, "camel.component.servlet.",
+ 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/2f9a99cc/components-starter/camel-servlet-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-servlet-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-servlet-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..0f72379
--- /dev/null
+++ b/components-starter/camel-servlet-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.servlet.enabled",
+ "description": "Enable servlet component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java b/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java
index 42fb9cb..10fd4c7 100644
--- a/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java
+++ b/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.sjms.batch.SjmsBatchComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SjmsBatchComponentConfiguration.class)
+@Conditional(SjmsBatchComponentAutoConfiguration.Condition.class)
public class SjmsBatchComponentAutoConfiguration {
@Bean(name = "sjms-batch-component")
@@ -69,4 +77,29 @@ public class SjmsBatchComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java b/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java
index 5b8903e..0079e89 100644
--- a/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java
+++ b/components-starter/camel-sjms-starter/src/main/java/org/apache/camel/component/sjms/springboot/SjmsComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.sjms.SjmsComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SjmsComponentConfiguration.class)
+@Conditional(SjmsComponentAutoConfiguration.Condition.class)
public class SjmsComponentAutoConfiguration {
@Bean(name = "sjms-component")
@@ -68,4 +76,29 @@ public class SjmsComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-sjms-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-sjms-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-sjms-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..cb2593c
--- /dev/null
+++ b/components-starter/camel-sjms-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,16 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.sjms-batch.enabled",
+ "description": "Enable sjms-batch component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.component.sjms.enabled",
+ "description": "Enable sjms component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java b/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java
index e9c14e9..3df2028 100644
--- a/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java
+++ b/components-starter/camel-slack-starter/src/main/java/org/apache/camel/component/slack/springboot/SlackComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.slack.SlackComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SlackComponentConfiguration.class)
+@Conditional(SlackComponentAutoConfiguration.Condition.class)
public class SlackComponentAutoConfiguration {
@Bean(name = "slack-component")
@@ -68,4 +76,29 @@ public class SlackComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-slack-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-slack-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-slack-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..7443895
--- /dev/null
+++ b/components-starter/camel-slack-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.slack.enabled",
+ "description": "Enable slack component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java b/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java
index 0a92c0d..5b7f603 100644
--- a/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java
+++ b/components-starter/camel-smpp-starter/src/main/java/org/apache/camel/component/smpp/springboot/SmppComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.smpp.SmppComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SmppComponentConfiguration.class)
+@Conditional(SmppComponentAutoConfiguration.Condition.class)
public class SmppComponentAutoConfiguration {
@Bean(name = {"smpp-component", "smpps-component"})
@@ -68,4 +76,29 @@ public class SmppComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-smpp-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-smpp-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-smpp-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..575cb11
--- /dev/null
+++ b/components-starter/camel-smpp-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.smpp.enabled",
+ "description": "Enable smpp component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java b/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java
index b51fc19..cf3b7e2 100644
--- a/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java
+++ b/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.component.snakeyaml.SnakeYAMLDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SnakeYAMLDataFormatConfiguration.class)
+@Conditional(SnakeYAMLDataFormatAutoConfiguration.Condition.class)
public class SnakeYAMLDataFormatAutoConfiguration {
@Bean(name = "yaml-snakeyaml-dataformat")
@@ -52,4 +60,29 @@ public class SnakeYAMLDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-snakeyaml-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-snakeyaml-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-snakeyaml-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..a1f91bf
--- /dev/null
+++ b/components-starter/camel-snakeyaml-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.yaml-snakeyaml.enabled",
+ "description": "Enable yaml-snakeyaml dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
[10/15] camel git commit: CAMEL-10550: re-generated starters
Posted by lb...@apache.org.
CAMEL-10550: re-generated starters
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2f9a99cc
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2f9a99cc
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2f9a99cc
Branch: refs/heads/camel-2.18.x
Commit: 2f9a99ccdabaf8b4666b8ae9556adc3513238c02
Parents: 2d902ab
Author: lburgazzoli <lb...@gmail.com>
Authored: Tue Dec 6 15:24:32 2016 +0100
Committer: lburgazzoli <lb...@gmail.com>
Committed: Tue Dec 6 15:24:32 2016 +0100
----------------------------------------------------------------------
.../AhcComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../WsComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../AMQPComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../ApnsComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../WebsocketComponentAutoConfiguration.java | 33 ++++
.../WebsocketComponentConfiguration.java | 4 +-
...dditional-spring-configuration-metadata.json | 10 ++
.../AvroComponentAutoConfiguration.java | 33 ++++
.../AvroDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 16 ++
.../BarcodeDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../Base64DataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../BeanIODataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../BeanstalkComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../BindyCsvDataFormatAutoConfiguration.java | 33 ++++
...yFixedLengthDataFormatAutoConfiguration.java | 33 ++++
...KeyValuePairDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 22 +++
.../BoonDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../BoxComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../BraintreeComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../CacheComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../CastorDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../CometdComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../DirectComponentAutoConfiguration.java | 33 ++++
.../DirectVmComponentAutoConfiguration.java | 33 ++++
.../LogComponentAutoConfiguration.java | 33 ++++
.../PropertiesComponentAutoConfiguration.java | 33 ++++
.../RestComponentAutoConfiguration.java | 33 ++++
.../SchedulerComponentAutoConfiguration.java | 33 ++++
.../SedaComponentAutoConfiguration.java | 33 ++++
.../StubComponentAutoConfiguration.java | 33 ++++
.../ValidatorComponentAutoConfiguration.java | 33 ++++
.../VmComponentAutoConfiguration.java | 32 ++++
.../XsltComponentAutoConfiguration.java | 33 ++++
.../GzipDataFormatAutoConfiguration.java | 33 ++++
...erializationDataFormatAutoConfiguration.java | 33 ++++
.../StringDataFormatAutoConfiguration.java | 33 ++++
.../ZipDataFormatAutoConfiguration.java | 33 ++++
.../BeanLanguageAutoConfiguration.java | 33 ++++
.../ConstantLanguageAutoConfiguration.java | 33 ++++
.../HeaderLanguageAutoConfiguration.java | 33 ++++
...changePropertyLanguageAutoConfiguration.java | 33 ++++
.../RefLanguageAutoConfiguration.java | 32 ++++
.../FileLanguageAutoConfiguration.java | 33 ++++
.../SimpleLanguageAutoConfiguration.java | 33 ++++
.../TokenizeLanguageAutoConfiguration.java | 33 ++++
.../XMLTokenizeLanguageAutoConfiguration.java | 33 ++++
.../XPathLanguageAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 154 +++++++++++++++++++
...italSignatureComponentAutoConfiguration.java | 33 ++++
.../CryptoDataFormatAutoConfiguration.java | 33 ++++
.../PGPDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 22 +++
.../CsvDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../CxfRsComponentAutoConfiguration.java | 33 ++++
.../CxfComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 16 ++
.../DisruptorComponentAutoConfiguration.java | 33 ++++
.../DisruptorVmComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 16 ++
.../DockerComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
...ElasticsearchComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../ElsqlComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../FacebookComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../FlatpackDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../FlinkComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../FreemarkerComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../GangliaComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
...oogleCalendarComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../GoogleDriveComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../GoogleMailComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../GroovyLanguageAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../GsonDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
...GuavaEventBusComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../HazelcastComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../HBaseComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../HdfsComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../HdfsComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../HessianDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../HL7DataFormatAutoConfiguration.java | 33 ++++
.../TerserLanguageAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 16 ++
.../HttpComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../HttpComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../ICalDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JacksonDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JacksonXMLDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JaxbDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JdbcComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JettyHttpComponentAutoConfiguration9.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JGroupsComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JibxDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JmsComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JohnzonDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JoltComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../SqlLanguageAutoConfiguration.java | 32 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JpaComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../ScpComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JsonPathLanguageAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../Jt400ComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JuelLanguageAutoConfiguration.java | 32 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../JXPathLanguageAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../KafkaComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../KestrelComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../LinkedInComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../LuceneComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../LumberjackComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../LZFDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../MailComponentAutoConfiguration.java | 33 ++++
...imeMultipartDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 16 ++
.../MetricsComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../Mina2ComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../MQTTComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../MsvComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../MustacheComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../MvelLanguageAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../MyBatisComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../NagiosComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../NettyHttpComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../NettyComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../NettyHttpComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../NettyComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../OgnlLanguageAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../Olingo2ComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../OpenShiftComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../PahoComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../ProtobufDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../QuartzComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../QuickfixjComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../RestletComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../RssDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../SalesforceComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../XQueryComponentAutoConfiguration.java | 33 ++++
.../XQueryLanguageAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 16 ++
.../JavaScriptLanguageAutoConfiguration.java | 33 ++++
.../PhpLanguageAutoConfiguration.java | 32 ++++
.../PythonLanguageAutoConfiguration.java | 33 ++++
.../RubyLanguageAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 28 ++++
.../ServiceNowComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../ServletComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../SjmsBatchComponentAutoConfiguration.java | 33 ++++
.../SjmsComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 16 ++
.../SlackComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../SmppComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../SnakeYAMLDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../SoapJaxbDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../SparkComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../SplunkComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../SpringBatchComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../EventComponentAutoConfiguration.java | 33 ++++
.../SpelLanguageAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 16 ++
.../SqlComponentAutoConfiguration.java | 33 ++++
.../SqlStoredComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 16 ++
.../SshComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../StompComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../SyslogDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../TidyMarkupDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../TarFileDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../TelegramComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../TwitterComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../UndertowComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
...UniVocityCsvDataFormatAutoConfiguration.java | 33 ++++
...tyFixedWidthDataFormatAutoConfiguration.java | 33 ++++
...UniVocityTsvDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 22 +++
.../VelocityComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../VertxComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../WebsocketComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../XmlBeansDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../XmlJsonDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../XmlRpcDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../XmlSignatureComponentAutoConfiguration.java | 33 ++++
.../XMLSecurityDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 16 ++
.../JsonDataFormatAutoConfiguration.java | 33 ++++
.../XStreamDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 16 ++
.../YammerComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../ZipFileDataFormatAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
.../ZooKeeperComponentAutoConfiguration.java | 33 ++++
...dditional-spring-configuration-metadata.json | 10 ++
295 files changed, 7088 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-ahc-starter/src/main/java/org/apache/camel/component/ahc/springboot/AhcComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ahc-starter/src/main/java/org/apache/camel/component/ahc/springboot/AhcComponentAutoConfiguration.java b/components-starter/camel-ahc-starter/src/main/java/org/apache/camel/component/ahc/springboot/AhcComponentAutoConfiguration.java
index e226da5..10bb171 100644
--- a/components-starter/camel-ahc-starter/src/main/java/org/apache/camel/component/ahc/springboot/AhcComponentAutoConfiguration.java
+++ b/components-starter/camel-ahc-starter/src/main/java/org/apache/camel/component/ahc/springboot/AhcComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.ahc.AhcComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(AhcComponentConfiguration.class)
+@Conditional(AhcComponentAutoConfiguration.Condition.class)
public class AhcComponentAutoConfiguration {
@Bean(name = "ahc-component")
@@ -68,4 +76,29 @@ public class AhcComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.ahc");
+ if (isEnabled(conditionContext, "camel.component.ahc.",
+ 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/2f9a99cc/components-starter/camel-ahc-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-ahc-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-ahc-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..395494a
--- /dev/null
+++ b/components-starter/camel-ahc-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.ahc.enabled",
+ "description": "Enable ahc component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-ahc-ws-starter/src/main/java/org/apache/camel/component/ahc/ws/springboot/WsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ahc-ws-starter/src/main/java/org/apache/camel/component/ahc/ws/springboot/WsComponentAutoConfiguration.java b/components-starter/camel-ahc-ws-starter/src/main/java/org/apache/camel/component/ahc/ws/springboot/WsComponentAutoConfiguration.java
index 97427fd..aa4bb5b 100644
--- a/components-starter/camel-ahc-ws-starter/src/main/java/org/apache/camel/component/ahc/ws/springboot/WsComponentAutoConfiguration.java
+++ b/components-starter/camel-ahc-ws-starter/src/main/java/org/apache/camel/component/ahc/ws/springboot/WsComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.ahc.ws.WsComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(WsComponentConfiguration.class)
+@Conditional(WsComponentAutoConfiguration.Condition.class)
public class WsComponentAutoConfiguration {
@Bean(name = {"ahc-ws-component", "ahc-wss-component"})
@@ -68,4 +76,29 @@ public class WsComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.ahc-ws");
+ if (isEnabled(conditionContext, "camel.component.ahc-ws.",
+ 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/2f9a99cc/components-starter/camel-ahc-ws-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-ahc-ws-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-ahc-ws-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..9a4a60b
--- /dev/null
+++ b/components-starter/camel-ahc-ws-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.ahc-ws.enabled",
+ "description": "Enable ahc-ws component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentAutoConfiguration.java b/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentAutoConfiguration.java
index 6da1448..2ed5076 100644
--- a/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentAutoConfiguration.java
+++ b/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.amqp.AMQPComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(AMQPComponentConfiguration.class)
+@Conditional(AMQPComponentAutoConfiguration.Condition.class)
public class AMQPComponentAutoConfiguration {
@Bean(name = "amqp-component")
@@ -68,4 +76,29 @@ public class AMQPComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.amqp");
+ if (isEnabled(conditionContext, "camel.component.amqp.",
+ 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/2f9a99cc/components-starter/camel-amqp-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-amqp-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-amqp-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..8689eeb
--- /dev/null
+++ b/components-starter/camel-amqp-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.amqp.enabled",
+ "description": "Enable amqp component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-apns-starter/src/main/java/org/apache/camel/component/apns/springboot/ApnsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-apns-starter/src/main/java/org/apache/camel/component/apns/springboot/ApnsComponentAutoConfiguration.java b/components-starter/camel-apns-starter/src/main/java/org/apache/camel/component/apns/springboot/ApnsComponentAutoConfiguration.java
index 7d623dc..d6c762b 100644
--- a/components-starter/camel-apns-starter/src/main/java/org/apache/camel/component/apns/springboot/ApnsComponentAutoConfiguration.java
+++ b/components-starter/camel-apns-starter/src/main/java/org/apache/camel/component/apns/springboot/ApnsComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.apns.ApnsComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ApnsComponentConfiguration.class)
+@Conditional(ApnsComponentAutoConfiguration.Condition.class)
public class ApnsComponentAutoConfiguration {
@Bean(name = "apns-component")
@@ -68,4 +76,29 @@ public class ApnsComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.apns");
+ if (isEnabled(conditionContext, "camel.component.apns.",
+ 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/2f9a99cc/components-starter/camel-apns-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-apns-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-apns-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..8bacd41
--- /dev/null
+++ b/components-starter/camel-apns-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.apns.enabled",
+ "description": "Enable apns component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentAutoConfiguration.java b/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentAutoConfiguration.java
index 8ca721c..7114836 100644
--- a/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentAutoConfiguration.java
+++ b/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.atmosphere.websocket.WebsocketComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(WebsocketComponentConfiguration.class)
+@Conditional(WebsocketComponentAutoConfiguration.Condition.class)
public class WebsocketComponentAutoConfiguration {
@Bean(name = "atmosphere-websocket-component")
@@ -69,4 +77,29 @@ public class WebsocketComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.atmosphere-websocket");
+ if (isEnabled(conditionContext,
+ "camel.component.atmosphere-websocket.", 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/2f9a99cc/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentConfiguration.java b/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentConfiguration.java
index 190bb22..c930430 100644
--- a/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentConfiguration.java
+++ b/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentConfiguration.java
@@ -42,8 +42,8 @@ public class WebsocketComponentConfiguration {
private HttpRegistry httpRegistry;
/**
* Whether to automatic bind multipart/form-data as attachments on the Camel
- * Exchange. This is turn off by default as this may require servet specific
- * configuration to enable this when using Servlet's.
+ * Exchange. This is turn off by default as this may require servlet
+ * specific configuration to enable this when using Servlet's.
*/
private Boolean attachmentMultipartBinding;
/**
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-atmosphere-websocket-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-atmosphere-websocket-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-atmosphere-websocket-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..481ba0b
--- /dev/null
+++ b/components-starter/camel-atmosphere-websocket-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.atmosphere-websocket.enabled",
+ "description": "Enable atmosphere-websocket component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-avro-starter/src/main/java/org/apache/camel/component/avro/springboot/AvroComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-avro-starter/src/main/java/org/apache/camel/component/avro/springboot/AvroComponentAutoConfiguration.java b/components-starter/camel-avro-starter/src/main/java/org/apache/camel/component/avro/springboot/AvroComponentAutoConfiguration.java
index 9a10743..54ec3de 100644
--- a/components-starter/camel-avro-starter/src/main/java/org/apache/camel/component/avro/springboot/AvroComponentAutoConfiguration.java
+++ b/components-starter/camel-avro-starter/src/main/java/org/apache/camel/component/avro/springboot/AvroComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.avro.AvroComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(AvroComponentConfiguration.class)
+@Conditional(AvroComponentAutoConfiguration.Condition.class)
public class AvroComponentAutoConfiguration {
@Bean(name = "avro-component")
@@ -68,4 +76,29 @@ public class AvroComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.avro");
+ if (isEnabled(conditionContext, "camel.component.avro.",
+ 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/2f9a99cc/components-starter/camel-avro-starter/src/main/java/org/apache/camel/dataformat/avro/springboot/AvroDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-avro-starter/src/main/java/org/apache/camel/dataformat/avro/springboot/AvroDataFormatAutoConfiguration.java b/components-starter/camel-avro-starter/src/main/java/org/apache/camel/dataformat/avro/springboot/AvroDataFormatAutoConfiguration.java
index 9d744ea..b34249e 100644
--- a/components-starter/camel-avro-starter/src/main/java/org/apache/camel/dataformat/avro/springboot/AvroDataFormatAutoConfiguration.java
+++ b/components-starter/camel-avro-starter/src/main/java/org/apache/camel/dataformat/avro/springboot/AvroDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.avro.AvroDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(AvroDataFormatConfiguration.class)
+@Conditional(AvroDataFormatAutoConfiguration.Condition.class)
public class AvroDataFormatAutoConfiguration {
@Bean(name = "avro-dataformat")
@@ -51,4 +59,29 @@ public class AvroDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.avro");
+ if (isEnabled(conditionContext, "camel.dataformat.avro.",
+ 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/2f9a99cc/components-starter/camel-avro-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-avro-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-avro-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..cf6bff0
--- /dev/null
+++ b/components-starter/camel-avro-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,16 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.avro.enabled",
+ "description": "Enable avro component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.avro.enabled",
+ "description": "Enable avro dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-barcode-starter/src/main/java/org/apache/camel/dataformat/barcode/springboot/BarcodeDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-barcode-starter/src/main/java/org/apache/camel/dataformat/barcode/springboot/BarcodeDataFormatAutoConfiguration.java b/components-starter/camel-barcode-starter/src/main/java/org/apache/camel/dataformat/barcode/springboot/BarcodeDataFormatAutoConfiguration.java
index c865566..3cb528f 100644
--- a/components-starter/camel-barcode-starter/src/main/java/org/apache/camel/dataformat/barcode/springboot/BarcodeDataFormatAutoConfiguration.java
+++ b/components-starter/camel-barcode-starter/src/main/java/org/apache/camel/dataformat/barcode/springboot/BarcodeDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.barcode.BarcodeDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(BarcodeDataFormatConfiguration.class)
+@Conditional(BarcodeDataFormatAutoConfiguration.Condition.class)
public class BarcodeDataFormatAutoConfiguration {
@Bean(name = "barcode-dataformat")
@@ -52,4 +60,29 @@ public class BarcodeDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.barcode");
+ if (isEnabled(conditionContext, "camel.dataformat.barcode.",
+ 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/2f9a99cc/components-starter/camel-barcode-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-barcode-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-barcode-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..b837fea
--- /dev/null
+++ b/components-starter/camel-barcode-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.barcode.enabled",
+ "description": "Enable barcode dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-base64-starter/src/main/java/org/apache/camel/dataformat/base64/springboot/Base64DataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-base64-starter/src/main/java/org/apache/camel/dataformat/base64/springboot/Base64DataFormatAutoConfiguration.java b/components-starter/camel-base64-starter/src/main/java/org/apache/camel/dataformat/base64/springboot/Base64DataFormatAutoConfiguration.java
index 204efb2..8b1639c 100644
--- a/components-starter/camel-base64-starter/src/main/java/org/apache/camel/dataformat/base64/springboot/Base64DataFormatAutoConfiguration.java
+++ b/components-starter/camel-base64-starter/src/main/java/org/apache/camel/dataformat/base64/springboot/Base64DataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.base64.Base64DataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(Base64DataFormatConfiguration.class)
+@Conditional(Base64DataFormatAutoConfiguration.Condition.class)
public class Base64DataFormatAutoConfiguration {
@Bean(name = "base64-dataformat")
@@ -52,4 +60,29 @@ public class Base64DataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.base64");
+ if (isEnabled(conditionContext, "camel.dataformat.base64.",
+ 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/2f9a99cc/components-starter/camel-base64-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-base64-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-base64-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..e036a73
--- /dev/null
+++ b/components-starter/camel-base64-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.base64.enabled",
+ "description": "Enable base64 dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-beanio-starter/src/main/java/org/apache/camel/dataformat/beanio/springboot/BeanIODataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-beanio-starter/src/main/java/org/apache/camel/dataformat/beanio/springboot/BeanIODataFormatAutoConfiguration.java b/components-starter/camel-beanio-starter/src/main/java/org/apache/camel/dataformat/beanio/springboot/BeanIODataFormatAutoConfiguration.java
index 00121a8..b65aa7c 100644
--- a/components-starter/camel-beanio-starter/src/main/java/org/apache/camel/dataformat/beanio/springboot/BeanIODataFormatAutoConfiguration.java
+++ b/components-starter/camel-beanio-starter/src/main/java/org/apache/camel/dataformat/beanio/springboot/BeanIODataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.beanio.BeanIODataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(BeanIODataFormatConfiguration.class)
+@Conditional(BeanIODataFormatAutoConfiguration.Condition.class)
public class BeanIODataFormatAutoConfiguration {
@Bean(name = "beanio-dataformat")
@@ -52,4 +60,29 @@ public class BeanIODataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.beanio");
+ if (isEnabled(conditionContext, "camel.dataformat.beanio.",
+ 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/2f9a99cc/components-starter/camel-beanio-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-beanio-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-beanio-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..443ace7
--- /dev/null
+++ b/components-starter/camel-beanio-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.beanio.enabled",
+ "description": "Enable beanio dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-beanstalk-starter/src/main/java/org/apache/camel/component/beanstalk/springboot/BeanstalkComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-beanstalk-starter/src/main/java/org/apache/camel/component/beanstalk/springboot/BeanstalkComponentAutoConfiguration.java b/components-starter/camel-beanstalk-starter/src/main/java/org/apache/camel/component/beanstalk/springboot/BeanstalkComponentAutoConfiguration.java
index b0cdb93..129bcff 100644
--- a/components-starter/camel-beanstalk-starter/src/main/java/org/apache/camel/component/beanstalk/springboot/BeanstalkComponentAutoConfiguration.java
+++ b/components-starter/camel-beanstalk-starter/src/main/java/org/apache/camel/component/beanstalk/springboot/BeanstalkComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.beanstalk.BeanstalkComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(BeanstalkComponentConfiguration.class)
+@Conditional(BeanstalkComponentAutoConfiguration.Condition.class)
public class BeanstalkComponentAutoConfiguration {
@Bean(name = "beanstalk-component")
@@ -69,4 +77,29 @@ public class BeanstalkComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.beanstalk");
+ if (isEnabled(conditionContext, "camel.component.beanstalk.",
+ 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/2f9a99cc/components-starter/camel-beanstalk-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-beanstalk-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-beanstalk-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..e408e11
--- /dev/null
+++ b/components-starter/camel-beanstalk-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.beanstalk.enabled",
+ "description": "Enable beanstalk component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/csv/springboot/BindyCsvDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/csv/springboot/BindyCsvDataFormatAutoConfiguration.java b/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/csv/springboot/BindyCsvDataFormatAutoConfiguration.java
index 5126a88..e02c0d3 100644
--- a/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/csv/springboot/BindyCsvDataFormatAutoConfiguration.java
+++ b/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/csv/springboot/BindyCsvDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(BindyCsvDataFormatConfiguration.class)
+@Conditional(BindyCsvDataFormatAutoConfiguration.Condition.class)
public class BindyCsvDataFormatAutoConfiguration {
@Bean(name = "bindy-csv-dataformat")
@@ -52,4 +60,29 @@ public class BindyCsvDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.bindy-csv");
+ if (isEnabled(conditionContext, "camel.dataformat.bindy-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/2f9a99cc/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/fixed/springboot/BindyFixedLengthDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/fixed/springboot/BindyFixedLengthDataFormatAutoConfiguration.java b/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/fixed/springboot/BindyFixedLengthDataFormatAutoConfiguration.java
index b29c731..4f977a8 100644
--- a/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/fixed/springboot/BindyFixedLengthDataFormatAutoConfiguration.java
+++ b/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/fixed/springboot/BindyFixedLengthDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.bindy.fixed.BindyFixedLengthDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(BindyFixedLengthDataFormatConfiguration.class)
+@Conditional(BindyFixedLengthDataFormatAutoConfiguration.Condition.class)
public class BindyFixedLengthDataFormatAutoConfiguration {
@Bean(name = "bindy-fixed-dataformat")
@@ -53,4 +61,29 @@ public class BindyFixedLengthDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.bindy-fixed");
+ if (isEnabled(conditionContext, "camel.dataformat.bindy-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/2f9a99cc/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/kvp/springboot/BindyKeyValuePairDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/kvp/springboot/BindyKeyValuePairDataFormatAutoConfiguration.java b/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/kvp/springboot/BindyKeyValuePairDataFormatAutoConfiguration.java
index e2a986f..f1d1fad 100644
--- a/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/kvp/springboot/BindyKeyValuePairDataFormatAutoConfiguration.java
+++ b/components-starter/camel-bindy-starter/src/main/java/org/apache/camel/dataformat/bindy/kvp/springboot/BindyKeyValuePairDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.bindy.kvp.BindyKeyValuePairDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(BindyKeyValuePairDataFormatConfiguration.class)
+@Conditional(BindyKeyValuePairDataFormatAutoConfiguration.Condition.class)
public class BindyKeyValuePairDataFormatAutoConfiguration {
@Bean(name = "bindy-kvp-dataformat")
@@ -53,4 +61,29 @@ public class BindyKeyValuePairDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.bindy-kvp");
+ if (isEnabled(conditionContext, "camel.dataformat.bindy-kvp.",
+ 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/2f9a99cc/components-starter/camel-bindy-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-bindy-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-bindy-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..9951609
--- /dev/null
+++ b/components-starter/camel-bindy-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,22 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.bindy-csv.enabled",
+ "description": "Enable bindy-csv dataformat",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.bindy-fixed.enabled",
+ "description": "Enable bindy-fixed dataformat",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.bindy-kvp.enabled",
+ "description": "Enable bindy-kvp dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-boon-starter/src/main/java/org/apache/camel/component/boon/springboot/BoonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-boon-starter/src/main/java/org/apache/camel/component/boon/springboot/BoonDataFormatAutoConfiguration.java b/components-starter/camel-boon-starter/src/main/java/org/apache/camel/component/boon/springboot/BoonDataFormatAutoConfiguration.java
index 36afa5b..92e449b 100644
--- a/components-starter/camel-boon-starter/src/main/java/org/apache/camel/component/boon/springboot/BoonDataFormatAutoConfiguration.java
+++ b/components-starter/camel-boon-starter/src/main/java/org/apache/camel/component/boon/springboot/BoonDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.component.boon.BoonDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(BoonDataFormatConfiguration.class)
+@Conditional(BoonDataFormatAutoConfiguration.Condition.class)
public class BoonDataFormatAutoConfiguration {
@Bean(name = "boon-dataformat")
@@ -51,4 +59,29 @@ public class BoonDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.boon");
+ if (isEnabled(conditionContext, "camel.dataformat.boon.",
+ 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/2f9a99cc/components-starter/camel-boon-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-boon-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-boon-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..d5105e7
--- /dev/null
+++ b/components-starter/camel-boon-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.boon.enabled",
+ "description": "Enable boon dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-box-starter/src/main/java/org/apache/camel/component/box/springboot/BoxComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-box-starter/src/main/java/org/apache/camel/component/box/springboot/BoxComponentAutoConfiguration.java b/components-starter/camel-box-starter/src/main/java/org/apache/camel/component/box/springboot/BoxComponentAutoConfiguration.java
index efd45ed..24fe897 100644
--- a/components-starter/camel-box-starter/src/main/java/org/apache/camel/component/box/springboot/BoxComponentAutoConfiguration.java
+++ b/components-starter/camel-box-starter/src/main/java/org/apache/camel/component/box/springboot/BoxComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.box.BoxComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(BoxComponentConfiguration.class)
+@Conditional(BoxComponentAutoConfiguration.Condition.class)
public class BoxComponentAutoConfiguration {
@Bean(name = "box-component")
@@ -68,4 +76,29 @@ public class BoxComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.box");
+ if (isEnabled(conditionContext, "camel.component.box.",
+ 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
[11/15] camel git commit: CAMEL-10551: spring-boot: make auto
configured dataformats and languages prototype
Posted by lb...@apache.org.
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
index 83dc340..8716634 100644
--- a/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
+++ b/components-starter/camel-script-starter/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class RubyLanguageAutoConfiguration {
@Bean(name = "ruby-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(RubyLanguage.class)
public RubyLanguage configureRubyLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java b/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java
index cf3b7e2..c165807 100644
--- a/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java
+++ b/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class SnakeYAMLDataFormatAutoConfiguration {
@Bean(name = "yaml-snakeyaml-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SnakeYAMLDataFormat.class)
public SnakeYAMLDataFormat configureSnakeYAMLDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java b/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java
index 0f3ab3b..645f150 100644
--- a/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java
+++ b/components-starter/camel-soap-starter/src/main/java/org/apache/camel/dataformat/soap/springboot/SoapJaxbDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class SoapJaxbDataFormatAutoConfiguration {
@Bean(name = "soapjaxb-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SoapJaxbDataFormat.class)
public SoapJaxbDataFormat configureSoapJaxbDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java b/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
index efb9308..06397a9 100644
--- a/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
+++ b/components-starter/camel-spring-starter/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class SpelLanguageAutoConfiguration {
@Bean(name = "spel-language")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SpelLanguage.class)
public SpelLanguage configureSpelLanguage(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java b/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java
index 563717a..1ecbcdb 100644
--- a/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java
+++ b/components-starter/camel-syslog-starter/src/main/java/org/apache/camel/component/syslog/springboot/SyslogDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class SyslogDataFormatAutoConfiguration {
@Bean(name = "syslog-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SyslogDataFormat.class)
public SyslogDataFormat configureSyslogDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java b/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java
index 00ce36e..4924fbd 100644
--- a/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java
+++ b/components-starter/camel-tagsoup-starter/src/main/java/org/apache/camel/dataformat/tagsoup/springboot/TidyMarkupDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class TidyMarkupDataFormatAutoConfiguration {
@Bean(name = "tidyMarkup-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(TidyMarkupDataFormat.class)
public TidyMarkupDataFormat configureTidyMarkupDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java b/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java
index 976a6f1..9aac89f 100644
--- a/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java
+++ b/components-starter/camel-tarfile-starter/src/main/java/org/apache/camel/dataformat/tarfile/springboot/TarFileDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class TarFileDataFormatAutoConfiguration {
@Bean(name = "tarfile-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(TarFileDataFormat.class)
public TarFileDataFormat configureTarFileDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java b/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java
index 82a5165..e207b1c 100644
--- a/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java
+++ b/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityCsvDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class UniVocityCsvDataFormatAutoConfiguration {
@Bean(name = "univocity-csv-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(UniVocityCsvDataFormat.class)
public UniVocityCsvDataFormat configureUniVocityCsvDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java b/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java
index a91b731..1dcb5c7 100644
--- a/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java
+++ b/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityFixedWidthDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class UniVocityFixedWidthDataFormatAutoConfiguration {
@Bean(name = "univocity-fixed-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(UniVocityFixedWidthDataFormat.class)
public UniVocityFixedWidthDataFormat configureUniVocityFixedWidthDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java b/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java
index b8a8e7e..9b2c9c8 100644
--- a/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java
+++ b/components-starter/camel-univocity-parsers-starter/src/main/java/org/apache/camel/dataformat/univocity/springboot/UniVocityTsvDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class UniVocityTsvDataFormatAutoConfiguration {
@Bean(name = "univocity-tsv-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(UniVocityTsvDataFormat.class)
public UniVocityTsvDataFormat configureUniVocityTsvDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java b/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java
index dbf2c36..4480d2c 100644
--- a/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java
+++ b/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class XmlBeansDataFormatAutoConfiguration {
@Bean(name = "xmlBeans-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XmlBeansDataFormat.class)
public XmlBeansDataFormat configureXmlBeansDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java b/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java
index 58b689e..02dd3c9 100644
--- a/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java
+++ b/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class XmlJsonDataFormatAutoConfiguration {
@Bean(name = "xmljson-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XmlJsonDataFormat.class)
public XmlJsonDataFormat configureXmlJsonDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java b/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java
index 61916e4..ac6720c 100644
--- a/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java
+++ b/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class XmlRpcDataFormatAutoConfiguration {
@Bean(name = "xmlrpc-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XmlRpcDataFormat.class)
public XmlRpcDataFormat configureXmlRpcDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java
index 648a3a8..12e5743 100644
--- a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java
+++ b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class XMLSecurityDataFormatAutoConfiguration {
@Bean(name = "secureXML-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XMLSecurityDataFormat.class)
public XMLSecurityDataFormat configureXMLSecurityDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java b/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java
index 2d12c1f..7c48290 100644
--- a/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java
+++ b/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class JsonDataFormatAutoConfiguration {
@Bean(name = "json-xstream-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JsonDataFormat.class)
public JsonDataFormat configureJsonDataFormat(CamelContext camelContext,
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java b/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java
index b54bd49..57be76e 100644
--- a/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java
+++ b/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class XStreamDataFormatAutoConfiguration {
@Bean(name = "xstream-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XStreamDataFormat.class)
public XStreamDataFormat configureXStreamDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java b/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java
index 3a22fc2..1efbabe 100644
--- a/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java
+++ b/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java
@@ -33,6 +33,7 @@ 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;
/**
@@ -44,6 +45,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
public class ZipFileDataFormatAutoConfiguration {
@Bean(name = "zipfile-dataformat")
+ @Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ZipFileDataFormat.class)
public ZipFileDataFormat configureZipFileDataFormat(
http://git-wip-us.apache.org/repos/asf/camel/blob/9ce3d180/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 19e3375..d7344c1 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
@@ -82,6 +82,7 @@ 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;
import static org.apache.camel.maven.packaging.JSonSchemaHelper.getSafeValue;
@@ -878,6 +879,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
String[] springBeanAliases = dataFormatAliases.stream().map(alias -> alias + "-dataformat").toArray(size -> new String[size]);
method.addAnnotation(Bean.class).setStringArrayValue("name", springBeanAliases);
+ method.addAnnotation(Scope.class).setStringValue("prototype");
method.addAnnotation(ConditionalOnClass.class).setLiteralValue("value", "CamelContext.class");
method.addAnnotation(ConditionalOnMissingBean.class).setLiteralValue("value", model.getShortJavaType() + ".class");
@@ -944,6 +946,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
String[] springBeanAliases = languageAliases.stream().map(alias -> alias + "-language").toArray(size -> new String[size]);
method.addAnnotation(Bean.class).setStringArrayValue("name", springBeanAliases);
+ method.addAnnotation(Scope.class).setStringValue("prototype");
method.addAnnotation(ConditionalOnClass.class).setLiteralValue("value", "CamelContext.class");
method.addAnnotation(ConditionalOnMissingBean.class).setLiteralValue("value", model.getShortJavaType() + ".class");
[02/15] camel git commit: CAMEL-10550: re-generated starters
Posted by lb...@apache.org.
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java b/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java
index e98951b..c6edd79 100644
--- a/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java
+++ b/components-starter/camel-vertx-starter/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.vertx.VertxComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(VertxComponentConfiguration.class)
+@Conditional(VertxComponentAutoConfiguration.Condition.class)
public class VertxComponentAutoConfiguration {
@Bean(name = "vertx-component")
@@ -68,4 +76,29 @@ public class VertxComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-vertx-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-vertx-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-vertx-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..b940999
--- /dev/null
+++ b/components-starter/camel-vertx-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.vertx.enabled",
+ "description": "Enable vertx component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java b/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java
index 43c66b9..be00e12 100644
--- a/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java
+++ b/components-starter/camel-websocket-starter/src/main/java/org/apache/camel/component/websocket/springboot/WebsocketComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.websocket.WebsocketComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(WebsocketComponentConfiguration.class)
+@Conditional(WebsocketComponentAutoConfiguration.Condition.class)
public class WebsocketComponentAutoConfiguration {
@Bean(name = "websocket-component")
@@ -69,4 +77,29 @@ public class WebsocketComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-websocket-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-websocket-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-websocket-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..1568e5a
--- /dev/null
+++ b/components-starter/camel-websocket-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.websocket.enabled",
+ "description": "Enable websocket component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java b/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java
index 968a99c..dbf2c36 100644
--- a/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java
+++ b/components-starter/camel-xmlbeans-starter/src/main/java/org/apache/camel/converter/xmlbeans/springboot/XmlBeansDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.converter.xmlbeans.XmlBeansDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(XmlBeansDataFormatConfiguration.class)
+@Conditional(XmlBeansDataFormatAutoConfiguration.Condition.class)
public class XmlBeansDataFormatAutoConfiguration {
@Bean(name = "xmlBeans-dataformat")
@@ -52,4 +60,29 @@ public class XmlBeansDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-xmlbeans-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmlbeans-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-xmlbeans-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..c22b7da
--- /dev/null
+++ b/components-starter/camel-xmlbeans-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.xmlbeans.enabled",
+ "description": "Enable xmlbeans dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java b/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java
index fc1c022..58b689e 100644
--- a/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java
+++ b/components-starter/camel-xmljson-starter/src/main/java/org/apache/camel/dataformat/xmljson/springboot/XmlJsonDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.xmljson.XmlJsonDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(XmlJsonDataFormatConfiguration.class)
+@Conditional(XmlJsonDataFormatAutoConfiguration.Condition.class)
public class XmlJsonDataFormatAutoConfiguration {
@Bean(name = "xmljson-dataformat")
@@ -52,4 +60,29 @@ public class XmlJsonDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-xmljson-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmljson-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-xmljson-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..dc62320
--- /dev/null
+++ b/components-starter/camel-xmljson-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.xmljson.enabled",
+ "description": "Enable xmljson dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java b/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java
index 6130329..61916e4 100644
--- a/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java
+++ b/components-starter/camel-xmlrpc-starter/src/main/java/org/apache/camel/dataformat/xmlrpc/springboot/XmlRpcDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.xmlrpc.XmlRpcDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(XmlRpcDataFormatConfiguration.class)
+@Conditional(XmlRpcDataFormatAutoConfiguration.Condition.class)
public class XmlRpcDataFormatAutoConfiguration {
@Bean(name = "xmlrpc-dataformat")
@@ -52,4 +60,29 @@ public class XmlRpcDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-xmlrpc-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmlrpc-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-xmlrpc-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..eaa2474
--- /dev/null
+++ b/components-starter/camel-xmlrpc-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.xmlrpc.enabled",
+ "description": "Enable xmlrpc dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java
index 19017ff..2ad5629 100644
--- a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java
+++ b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.xmlsecurity.XmlSignatureComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(XmlSignatureComponentConfiguration.class)
+@Conditional(XmlSignatureComponentAutoConfiguration.Condition.class)
public class XmlSignatureComponentAutoConfiguration {
@Bean(name = "xmlsecurity-component")
@@ -69,4 +77,29 @@ public class XmlSignatureComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java
index c5e39fc..648a3a8 100644
--- a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java
+++ b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/dataformat/xmlsecurity/springboot/XMLSecurityDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.xmlsecurity.XMLSecurityDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(XMLSecurityDataFormatConfiguration.class)
+@Conditional(XMLSecurityDataFormatAutoConfiguration.Condition.class)
public class XMLSecurityDataFormatAutoConfiguration {
@Bean(name = "secureXML-dataformat")
@@ -52,4 +60,29 @@ public class XMLSecurityDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-xmlsecurity-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-xmlsecurity-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-xmlsecurity-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..063667c
--- /dev/null
+++ b/components-starter/camel-xmlsecurity-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,16 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.xmlsecurity.enabled",
+ "description": "Enable xmlsecurity component",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.securexml.enabled",
+ "description": "Enable securexml dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java b/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java
index 9e52328..2d12c1f 100644
--- a/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java
+++ b/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.xstream.JsonDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JsonDataFormatConfiguration.class)
+@Conditional(JsonDataFormatAutoConfiguration.Condition.class)
public class JsonDataFormatAutoConfiguration {
@Bean(name = "json-xstream-dataformat")
@@ -51,4 +59,29 @@ public class JsonDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java b/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java
index e93b205..b54bd49 100644
--- a/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java
+++ b/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/XStreamDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.xstream.XStreamDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(XStreamDataFormatConfiguration.class)
+@Conditional(XStreamDataFormatAutoConfiguration.Condition.class)
public class XStreamDataFormatAutoConfiguration {
@Bean(name = "xstream-dataformat")
@@ -52,4 +60,29 @@ public class XStreamDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-xstream-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-xstream-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-xstream-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..f5dc7f7
--- /dev/null
+++ b/components-starter/camel-xstream-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,16 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.xstream.enabled",
+ "description": "Enable xstream dataformat",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.json-xstream.enabled",
+ "description": "Enable json-xstream dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java b/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java
index cea062f..b6c2159 100644
--- a/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java
+++ b/components-starter/camel-yammer-starter/src/main/java/org/apache/camel/component/yammer/springboot/YammerComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.yammer.YammerComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(YammerComponentConfiguration.class)
+@Conditional(YammerComponentAutoConfiguration.Condition.class)
public class YammerComponentAutoConfiguration {
@Bean(name = "yammer-component")
@@ -68,4 +76,29 @@ public class YammerComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-yammer-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-yammer-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-yammer-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..ac1ce2c
--- /dev/null
+++ b/components-starter/camel-yammer-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.yammer.enabled",
+ "description": "Enable yammer component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java b/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java
index 59ada4e..3a22fc2 100644
--- a/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java
+++ b/components-starter/camel-zipfile-starter/src/main/java/org/apache/camel/dataformat/zipfile/springboot/ZipFileDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.zipfile.ZipFileDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ZipFileDataFormatConfiguration.class)
+@Conditional(ZipFileDataFormatAutoConfiguration.Condition.class)
public class ZipFileDataFormatAutoConfiguration {
@Bean(name = "zipfile-dataformat")
@@ -52,4 +60,29 @@ public class ZipFileDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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/2f9a99cc/components-starter/camel-zipfile-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-zipfile-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-zipfile-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..134642d
--- /dev/null
+++ b/components-starter/camel-zipfile-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.zipfile.enabled",
+ "description": "Enable zipfile dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java b/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java
index 3cc05f3..a904109 100644
--- a/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java
+++ b/components-starter/camel-zookeeper-starter/src/main/java/org/apache/camel/component/zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.zookeeper.ZooKeeperComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ZooKeeperComponentConfiguration.class)
+@Conditional(ZooKeeperComponentAutoConfiguration.Condition.class)
public class ZooKeeperComponentAutoConfiguration {
@Bean(name = "zookeeper-component")
@@ -69,4 +77,29 @@ public class ZooKeeperComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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"));
+ }
+ 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/2f9a99cc/components-starter/camel-zookeeper-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-zookeeper-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-zookeeper-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..10a604f
--- /dev/null
+++ b/components-starter/camel-zookeeper-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.zookeeper.enabled",
+ "description": "Enable zookeeper component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
[15/15] camel git commit: CAMEL-10552: regenerate spring boot
component starters
Posted by lb...@apache.org.
CAMEL-10552: regenerate spring boot component starters
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/82ba1b80
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/82ba1b80
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/82ba1b80
Branch: refs/heads/camel-2.18.x
Commit: 82ba1b8047110ac166602214cc87ac93a99f2502
Parents: 63e4b80
Author: lburgazzoli <lb...@gmail.com>
Authored: Tue Dec 6 17:04:52 2016 +0100
Committer: lburgazzoli <lb...@gmail.com>
Committed: Tue Dec 6 17:04:52 2016 +0100
----------------------------------------------------------------------
.../component/ahc/springboot/AhcComponentAutoConfiguration.java | 2 ++
.../component/ahc/ws/springboot/WsComponentAutoConfiguration.java | 2 ++
.../component/amqp/springboot/AMQPComponentAutoConfiguration.java | 2 ++
.../component/apns/springboot/ApnsComponentAutoConfiguration.java | 2 ++
.../websocket/springboot/WebsocketComponentAutoConfiguration.java | 2 ++
.../component/avro/springboot/AvroComponentAutoConfiguration.java | 2 ++
.../beanstalk/springboot/BeanstalkComponentAutoConfiguration.java | 2 ++
.../component/box/springboot/BoxComponentAutoConfiguration.java | 2 ++
.../braintree/springboot/BraintreeComponentAutoConfiguration.java | 2 ++
.../cache/springboot/CacheComponentAutoConfiguration.java | 2 ++
.../cometd/springboot/CometdComponentAutoConfiguration.java | 2 ++
.../direct/springboot/DirectComponentAutoConfiguration.java | 2 ++
.../directvm/springboot/DirectVmComponentAutoConfiguration.java | 2 ++
.../component/log/springboot/LogComponentAutoConfiguration.java | 2 ++
.../springboot/PropertiesComponentAutoConfiguration.java | 2 ++
.../component/rest/springboot/RestComponentAutoConfiguration.java | 2 ++
.../scheduler/springboot/SchedulerComponentAutoConfiguration.java | 2 ++
.../component/seda/springboot/SedaComponentAutoConfiguration.java | 2 ++
.../component/stub/springboot/StubComponentAutoConfiguration.java | 2 ++
.../validator/springboot/ValidatorComponentAutoConfiguration.java | 2 ++
.../component/vm/springboot/VmComponentAutoConfiguration.java | 2 ++
.../component/xslt/springboot/XsltComponentAutoConfiguration.java | 2 ++
.../springboot/DigitalSignatureComponentAutoConfiguration.java | 2 ++
.../cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java | 2 ++
.../component/cxf/springboot/CxfComponentAutoConfiguration.java | 2 ++
.../disruptor/springboot/DisruptorComponentAutoConfiguration.java | 2 ++
.../vm/springboot/DisruptorVmComponentAutoConfiguration.java | 2 ++
.../docker/springboot/DockerComponentAutoConfiguration.java | 2 ++
.../springboot/ElasticsearchComponentAutoConfiguration.java | 2 ++
.../elsql/springboot/ElsqlComponentAutoConfiguration.java | 2 ++
.../facebook/springboot/FacebookComponentAutoConfiguration.java | 2 ++
.../flink/springboot/FlinkComponentAutoConfiguration.java | 2 ++
.../springboot/FreemarkerComponentAutoConfiguration.java | 2 ++
.../ganglia/springboot/GangliaComponentAutoConfiguration.java | 2 ++
.../springboot/GoogleCalendarComponentAutoConfiguration.java | 2 ++
.../drive/springboot/GoogleDriveComponentAutoConfiguration.java | 2 ++
.../mail/springboot/GoogleMailComponentAutoConfiguration.java | 2 ++
.../springboot/GuavaEventBusComponentAutoConfiguration.java | 2 ++
.../hazelcast/springboot/HazelcastComponentAutoConfiguration.java | 2 ++
.../hbase/springboot/HBaseComponentAutoConfiguration.java | 2 ++
.../component/hdfs/springboot/HdfsComponentAutoConfiguration.java | 2 ++
.../component/hdfs2/springboot/HdfsComponentAutoConfiguration.java | 2 ++
.../component/http/springboot/HttpComponentAutoConfiguration.java | 2 ++
.../component/http4/springboot/HttpComponentAutoConfiguration.java | 2 ++
.../component/jdbc/springboot/JdbcComponentAutoConfiguration.java | 2 ++
.../jetty9/springboot/JettyHttpComponentAutoConfiguration9.java | 2 ++
.../jgroups/springboot/JGroupsComponentAutoConfiguration.java | 2 ++
.../component/jms/springboot/JmsComponentAutoConfiguration.java | 2 ++
.../component/jolt/springboot/JoltComponentAutoConfiguration.java | 2 ++
.../component/jpa/springboot/JpaComponentAutoConfiguration.java | 2 ++
.../component/scp/springboot/ScpComponentAutoConfiguration.java | 2 ++
.../jt400/springboot/Jt400ComponentAutoConfiguration.java | 2 ++
.../kafka/springboot/KafkaComponentAutoConfiguration.java | 2 ++
.../kestrel/springboot/KestrelComponentAutoConfiguration.java | 2 ++
.../linkedin/springboot/LinkedInComponentAutoConfiguration.java | 2 ++
.../lucene/springboot/LuceneComponentAutoConfiguration.java | 2 ++
.../springboot/LumberjackComponentAutoConfiguration.java | 2 ++
.../component/mail/springboot/MailComponentAutoConfiguration.java | 2 ++
.../metrics/springboot/MetricsComponentAutoConfiguration.java | 2 ++
.../mina2/springboot/Mina2ComponentAutoConfiguration.java | 2 ++
.../component/mqtt/springboot/MQTTComponentAutoConfiguration.java | 2 ++
.../validator/msv/springboot/MsvComponentAutoConfiguration.java | 2 ++
.../mustache/springboot/MustacheComponentAutoConfiguration.java | 2 ++
.../mybatis/springboot/MyBatisComponentAutoConfiguration.java | 2 ++
.../nagios/springboot/NagiosComponentAutoConfiguration.java | 2 ++
.../netty/http/springboot/NettyHttpComponentAutoConfiguration.java | 2 ++
.../netty/springboot/NettyComponentAutoConfiguration.java | 2 ++
.../http/springboot/NettyHttpComponentAutoConfiguration.java | 2 ++
.../netty4/springboot/NettyComponentAutoConfiguration.java | 2 ++
.../olingo2/springboot/Olingo2ComponentAutoConfiguration.java | 2 ++
.../openshift/springboot/OpenShiftComponentAutoConfiguration.java | 2 ++
.../component/paho/springboot/PahoComponentAutoConfiguration.java | 2 ++
.../quartz2/springboot/QuartzComponentAutoConfiguration.java | 2 ++
.../quickfixj/springboot/QuickfixjComponentAutoConfiguration.java | 2 ++
.../restlet/springboot/RestletComponentAutoConfiguration.java | 2 ++
.../springboot/SalesforceComponentAutoConfiguration.java | 2 ++
.../xquery/springboot/XQueryComponentAutoConfiguration.java | 2 ++
.../springboot/ServiceNowComponentAutoConfiguration.java | 2 ++
.../servlet/springboot/ServletComponentAutoConfiguration.java | 2 ++
.../sjms/batch/springboot/SjmsBatchComponentAutoConfiguration.java | 2 ++
.../component/sjms/springboot/SjmsComponentAutoConfiguration.java | 2 ++
.../slack/springboot/SlackComponentAutoConfiguration.java | 2 ++
.../component/smpp/springboot/SmppComponentAutoConfiguration.java | 2 ++
.../spark/springboot/SparkComponentAutoConfiguration.java | 2 ++
.../splunk/springboot/SplunkComponentAutoConfiguration.java | 2 ++
.../batch/springboot/SpringBatchComponentAutoConfiguration.java | 2 ++
.../event/springboot/EventComponentAutoConfiguration.java | 2 ++
.../component/sql/springboot/SqlComponentAutoConfiguration.java | 2 ++
.../sql/stored/springboot/SqlStoredComponentAutoConfiguration.java | 2 ++
.../component/ssh/springboot/SshComponentAutoConfiguration.java | 2 ++
.../stomp/springboot/StompComponentAutoConfiguration.java | 2 ++
.../telegram/springboot/TelegramComponentAutoConfiguration.java | 2 ++
.../twitter/springboot/TwitterComponentAutoConfiguration.java | 2 ++
.../undertow/springboot/UndertowComponentAutoConfiguration.java | 2 ++
.../velocity/springboot/VelocityComponentAutoConfiguration.java | 2 ++
.../vertx/springboot/VertxComponentAutoConfiguration.java | 2 ++
.../websocket/springboot/WebsocketComponentAutoConfiguration.java | 2 ++
.../springboot/XmlSignatureComponentAutoConfiguration.java | 2 ++
.../yammer/springboot/YammerComponentAutoConfiguration.java | 2 ++
.../zookeeper/springboot/ZooKeeperComponentAutoConfiguration.java | 2 ++
100 files changed, 200 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-ahc-starter/src/main/java/org/apache/camel/component/ahc/springboot/AhcComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ahc-starter/src/main/java/org/apache/camel/component/ahc/springboot/AhcComponentAutoConfiguration.java b/components-starter/camel-ahc-starter/src/main/java/org/apache/camel/component/ahc/springboot/AhcComponentAutoConfiguration.java
index 10bb171..da15a4f 100644
--- a/components-starter/camel-ahc-starter/src/main/java/org/apache/camel/component/ahc/springboot/AhcComponentAutoConfiguration.java
+++ b/components-starter/camel-ahc-starter/src/main/java/org/apache/camel/component/ahc/springboot/AhcComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(AhcComponentAutoConfiguration.Condition.class)
public class AhcComponentAutoConfiguration {
+ @Lazy
@Bean(name = "ahc-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(AhcComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-ahc-ws-starter/src/main/java/org/apache/camel/component/ahc/ws/springboot/WsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ahc-ws-starter/src/main/java/org/apache/camel/component/ahc/ws/springboot/WsComponentAutoConfiguration.java b/components-starter/camel-ahc-ws-starter/src/main/java/org/apache/camel/component/ahc/ws/springboot/WsComponentAutoConfiguration.java
index aa4bb5b..0f20158 100644
--- a/components-starter/camel-ahc-ws-starter/src/main/java/org/apache/camel/component/ahc/ws/springboot/WsComponentAutoConfiguration.java
+++ b/components-starter/camel-ahc-ws-starter/src/main/java/org/apache/camel/component/ahc/ws/springboot/WsComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(WsComponentAutoConfiguration.Condition.class)
public class WsComponentAutoConfiguration {
+ @Lazy
@Bean(name = {"ahc-ws-component", "ahc-wss-component"})
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(WsComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentAutoConfiguration.java b/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentAutoConfiguration.java
index 2ed5076..08e3f2c 100644
--- a/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentAutoConfiguration.java
+++ b/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(AMQPComponentAutoConfiguration.Condition.class)
public class AMQPComponentAutoConfiguration {
+ @Lazy
@Bean(name = "amqp-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(AMQPComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-apns-starter/src/main/java/org/apache/camel/component/apns/springboot/ApnsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-apns-starter/src/main/java/org/apache/camel/component/apns/springboot/ApnsComponentAutoConfiguration.java b/components-starter/camel-apns-starter/src/main/java/org/apache/camel/component/apns/springboot/ApnsComponentAutoConfiguration.java
index d6c762b..9c88df0 100644
--- a/components-starter/camel-apns-starter/src/main/java/org/apache/camel/component/apns/springboot/ApnsComponentAutoConfiguration.java
+++ b/components-starter/camel-apns-starter/src/main/java/org/apache/camel/component/apns/springboot/ApnsComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(ApnsComponentAutoConfiguration.Condition.class)
public class ApnsComponentAutoConfiguration {
+ @Lazy
@Bean(name = "apns-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ApnsComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentAutoConfiguration.java b/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentAutoConfiguration.java
index 7114836..ce73a19 100644
--- a/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentAutoConfiguration.java
+++ b/components-starter/camel-atmosphere-websocket-starter/src/main/java/org/apache/camel/component/atmosphere/websocket/springboot/WebsocketComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(WebsocketComponentAutoConfiguration.Condition.class)
public class WebsocketComponentAutoConfiguration {
+ @Lazy
@Bean(name = "atmosphere-websocket-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(WebsocketComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-avro-starter/src/main/java/org/apache/camel/component/avro/springboot/AvroComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-avro-starter/src/main/java/org/apache/camel/component/avro/springboot/AvroComponentAutoConfiguration.java b/components-starter/camel-avro-starter/src/main/java/org/apache/camel/component/avro/springboot/AvroComponentAutoConfiguration.java
index 54ec3de..becef89 100644
--- a/components-starter/camel-avro-starter/src/main/java/org/apache/camel/component/avro/springboot/AvroComponentAutoConfiguration.java
+++ b/components-starter/camel-avro-starter/src/main/java/org/apache/camel/component/avro/springboot/AvroComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(AvroComponentAutoConfiguration.Condition.class)
public class AvroComponentAutoConfiguration {
+ @Lazy
@Bean(name = "avro-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(AvroComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-beanstalk-starter/src/main/java/org/apache/camel/component/beanstalk/springboot/BeanstalkComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-beanstalk-starter/src/main/java/org/apache/camel/component/beanstalk/springboot/BeanstalkComponentAutoConfiguration.java b/components-starter/camel-beanstalk-starter/src/main/java/org/apache/camel/component/beanstalk/springboot/BeanstalkComponentAutoConfiguration.java
index 129bcff..a9dc374 100644
--- a/components-starter/camel-beanstalk-starter/src/main/java/org/apache/camel/component/beanstalk/springboot/BeanstalkComponentAutoConfiguration.java
+++ b/components-starter/camel-beanstalk-starter/src/main/java/org/apache/camel/component/beanstalk/springboot/BeanstalkComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(BeanstalkComponentAutoConfiguration.Condition.class)
public class BeanstalkComponentAutoConfiguration {
+ @Lazy
@Bean(name = "beanstalk-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BeanstalkComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-box-starter/src/main/java/org/apache/camel/component/box/springboot/BoxComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-box-starter/src/main/java/org/apache/camel/component/box/springboot/BoxComponentAutoConfiguration.java b/components-starter/camel-box-starter/src/main/java/org/apache/camel/component/box/springboot/BoxComponentAutoConfiguration.java
index 24fe897..f0005dd 100644
--- a/components-starter/camel-box-starter/src/main/java/org/apache/camel/component/box/springboot/BoxComponentAutoConfiguration.java
+++ b/components-starter/camel-box-starter/src/main/java/org/apache/camel/component/box/springboot/BoxComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(BoxComponentAutoConfiguration.Condition.class)
public class BoxComponentAutoConfiguration {
+ @Lazy
@Bean(name = "box-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BoxComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-braintree-starter/src/main/java/org/apache/camel/component/braintree/springboot/BraintreeComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-braintree-starter/src/main/java/org/apache/camel/component/braintree/springboot/BraintreeComponentAutoConfiguration.java b/components-starter/camel-braintree-starter/src/main/java/org/apache/camel/component/braintree/springboot/BraintreeComponentAutoConfiguration.java
index 36ec40d..7d18e9e 100644
--- a/components-starter/camel-braintree-starter/src/main/java/org/apache/camel/component/braintree/springboot/BraintreeComponentAutoConfiguration.java
+++ b/components-starter/camel-braintree-starter/src/main/java/org/apache/camel/component/braintree/springboot/BraintreeComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(BraintreeComponentAutoConfiguration.Condition.class)
public class BraintreeComponentAutoConfiguration {
+ @Lazy
@Bean(name = "braintree-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BraintreeComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentAutoConfiguration.java b/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentAutoConfiguration.java
index aa68da4..4a27f2b 100644
--- a/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentAutoConfiguration.java
+++ b/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(CacheComponentAutoConfiguration.Condition.class)
public class CacheComponentAutoConfiguration {
+ @Lazy
@Bean(name = "cache-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(CacheComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java b/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java
index 4f7acd9..de688ce 100644
--- a/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java
+++ b/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(CometdComponentAutoConfiguration.Condition.class)
public class CometdComponentAutoConfiguration {
+ @Lazy
@Bean(name = {"cometd-component", "cometds-component"})
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(CometdComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java
index 3de1834..d06bbab 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(DirectComponentAutoConfiguration.Condition.class)
public class DirectComponentAutoConfiguration {
+ @Lazy
@Bean(name = "direct-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(DirectComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java
index 919a350..e9ef1c0 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(DirectVmComponentAutoConfiguration.Condition.class)
public class DirectVmComponentAutoConfiguration {
+ @Lazy
@Bean(name = "direct-vm-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(DirectVmComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java
index 9838a55..6cf91f0 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(LogComponentAutoConfiguration.Condition.class)
public class LogComponentAutoConfiguration {
+ @Lazy
@Bean(name = "log-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(LogComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java
index 22a2153..8f58b64 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(PropertiesComponentAutoConfiguration.Condition.class)
public class PropertiesComponentAutoConfiguration {
+ @Lazy
@Bean(name = "properties-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(PropertiesComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java
index 761e316..590dec7 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(RestComponentAutoConfiguration.Condition.class)
public class RestComponentAutoConfiguration {
+ @Lazy
@Bean(name = "rest-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(RestComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java
index 41404d2..dc582fe 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(SchedulerComponentAutoConfiguration.Condition.class)
public class SchedulerComponentAutoConfiguration {
+ @Lazy
@Bean(name = "scheduler-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SchedulerComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java
index ccfe0ea..74c98cc 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(SedaComponentAutoConfiguration.Condition.class)
public class SedaComponentAutoConfiguration {
+ @Lazy
@Bean(name = "seda-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SedaComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java
index 7e8c1f6..252adea 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(StubComponentAutoConfiguration.Condition.class)
public class StubComponentAutoConfiguration {
+ @Lazy
@Bean(name = "stub-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(StubComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java
index fc0e834..c0e2497 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(ValidatorComponentAutoConfiguration.Condition.class)
public class ValidatorComponentAutoConfiguration {
+ @Lazy
@Bean(name = "validator-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ValidatorComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java
index acc966a..70247cc 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(VmComponentAutoConfiguration.Condition.class)
public class VmComponentAutoConfiguration {
+ @Lazy
@Bean(name = "vm-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(VmComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java
index c28101a..b1de4b8 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(XsltComponentAutoConfiguration.Condition.class)
public class XsltComponentAutoConfiguration {
+ @Lazy
@Bean(name = "xslt-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XsltComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java
index cf701b3..8727645 100644
--- a/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java
+++ b/components-starter/camel-crypto-starter/src/main/java/org/apache/camel/component/crypto/springboot/DigitalSignatureComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(DigitalSignatureComponentAutoConfiguration.Condition.class)
public class DigitalSignatureComponentAutoConfiguration {
+ @Lazy
@Bean(name = "crypto-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(DigitalSignatureComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java
index d9530e8..0777954 100644
--- a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java
+++ b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/jaxrs/springboot/CxfRsComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(CxfRsComponentAutoConfiguration.Condition.class)
public class CxfRsComponentAutoConfiguration {
+ @Lazy
@Bean(name = "cxfrs-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(CxfRsComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java
index 7faae3c..356922c 100644
--- a/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java
+++ b/components-starter/camel-cxf-starter/src/main/java/org/apache/camel/component/cxf/springboot/CxfComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(CxfComponentAutoConfiguration.Condition.class)
public class CxfComponentAutoConfiguration {
+ @Lazy
@Bean(name = "cxf-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(CxfComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentAutoConfiguration.java b/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentAutoConfiguration.java
index 73e8759..abcd4cf 100644
--- a/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentAutoConfiguration.java
+++ b/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(DisruptorComponentAutoConfiguration.Condition.class)
public class DisruptorComponentAutoConfiguration {
+ @Lazy
@Bean(name = "disruptor-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(DisruptorComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentAutoConfiguration.java b/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentAutoConfiguration.java
index ac160e9..5f03cad 100644
--- a/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentAutoConfiguration.java
+++ b/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(DisruptorVmComponentAutoConfiguration.Condition.class)
public class DisruptorVmComponentAutoConfiguration {
+ @Lazy
@Bean(name = "disruptor-vm-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(DisruptorVmComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-docker-starter/src/main/java/org/apache/camel/component/docker/springboot/DockerComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-docker-starter/src/main/java/org/apache/camel/component/docker/springboot/DockerComponentAutoConfiguration.java b/components-starter/camel-docker-starter/src/main/java/org/apache/camel/component/docker/springboot/DockerComponentAutoConfiguration.java
index 0442ca7..31bc4a9 100644
--- a/components-starter/camel-docker-starter/src/main/java/org/apache/camel/component/docker/springboot/DockerComponentAutoConfiguration.java
+++ b/components-starter/camel-docker-starter/src/main/java/org/apache/camel/component/docker/springboot/DockerComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(DockerComponentAutoConfiguration.Condition.class)
public class DockerComponentAutoConfiguration {
+ @Lazy
@Bean(name = "docker-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(DockerComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/elasticsearch/springboot/ElasticsearchComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/elasticsearch/springboot/ElasticsearchComponentAutoConfiguration.java b/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/elasticsearch/springboot/ElasticsearchComponentAutoConfiguration.java
index 90d25ad..13c35a8 100644
--- a/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/elasticsearch/springboot/ElasticsearchComponentAutoConfiguration.java
+++ b/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/elasticsearch/springboot/ElasticsearchComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(ElasticsearchComponentAutoConfiguration.Condition.class)
public class ElasticsearchComponentAutoConfiguration {
+ @Lazy
@Bean(name = "elasticsearch-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ElasticsearchComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-elsql-starter/src/main/java/org/apache/camel/component/elsql/springboot/ElsqlComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-elsql-starter/src/main/java/org/apache/camel/component/elsql/springboot/ElsqlComponentAutoConfiguration.java b/components-starter/camel-elsql-starter/src/main/java/org/apache/camel/component/elsql/springboot/ElsqlComponentAutoConfiguration.java
index bad1fa9..fce8330 100644
--- a/components-starter/camel-elsql-starter/src/main/java/org/apache/camel/component/elsql/springboot/ElsqlComponentAutoConfiguration.java
+++ b/components-starter/camel-elsql-starter/src/main/java/org/apache/camel/component/elsql/springboot/ElsqlComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(ElsqlComponentAutoConfiguration.Condition.class)
public class ElsqlComponentAutoConfiguration {
+ @Lazy
@Bean(name = "elsql-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ElsqlComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-facebook-starter/src/main/java/org/apache/camel/component/facebook/springboot/FacebookComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-facebook-starter/src/main/java/org/apache/camel/component/facebook/springboot/FacebookComponentAutoConfiguration.java b/components-starter/camel-facebook-starter/src/main/java/org/apache/camel/component/facebook/springboot/FacebookComponentAutoConfiguration.java
index 1fc3f79..2d54737 100644
--- a/components-starter/camel-facebook-starter/src/main/java/org/apache/camel/component/facebook/springboot/FacebookComponentAutoConfiguration.java
+++ b/components-starter/camel-facebook-starter/src/main/java/org/apache/camel/component/facebook/springboot/FacebookComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(FacebookComponentAutoConfiguration.Condition.class)
public class FacebookComponentAutoConfiguration {
+ @Lazy
@Bean(name = "facebook-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(FacebookComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-flink-starter/src/main/java/org/apache/camel/component/flink/springboot/FlinkComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-flink-starter/src/main/java/org/apache/camel/component/flink/springboot/FlinkComponentAutoConfiguration.java b/components-starter/camel-flink-starter/src/main/java/org/apache/camel/component/flink/springboot/FlinkComponentAutoConfiguration.java
index 9599519..abdf7e1 100644
--- a/components-starter/camel-flink-starter/src/main/java/org/apache/camel/component/flink/springboot/FlinkComponentAutoConfiguration.java
+++ b/components-starter/camel-flink-starter/src/main/java/org/apache/camel/component/flink/springboot/FlinkComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(FlinkComponentAutoConfiguration.Condition.class)
public class FlinkComponentAutoConfiguration {
+ @Lazy
@Bean(name = "flink-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(FlinkComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-freemarker-starter/src/main/java/org/apache/camel/component/freemarker/springboot/FreemarkerComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-freemarker-starter/src/main/java/org/apache/camel/component/freemarker/springboot/FreemarkerComponentAutoConfiguration.java b/components-starter/camel-freemarker-starter/src/main/java/org/apache/camel/component/freemarker/springboot/FreemarkerComponentAutoConfiguration.java
index f876625..d6ca95f 100644
--- a/components-starter/camel-freemarker-starter/src/main/java/org/apache/camel/component/freemarker/springboot/FreemarkerComponentAutoConfiguration.java
+++ b/components-starter/camel-freemarker-starter/src/main/java/org/apache/camel/component/freemarker/springboot/FreemarkerComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(FreemarkerComponentAutoConfiguration.Condition.class)
public class FreemarkerComponentAutoConfiguration {
+ @Lazy
@Bean(name = "freemarker-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(FreemarkerComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-ganglia-starter/src/main/java/org/apache/camel/component/ganglia/springboot/GangliaComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ganglia-starter/src/main/java/org/apache/camel/component/ganglia/springboot/GangliaComponentAutoConfiguration.java b/components-starter/camel-ganglia-starter/src/main/java/org/apache/camel/component/ganglia/springboot/GangliaComponentAutoConfiguration.java
index b39d7d3..8efb507 100644
--- a/components-starter/camel-ganglia-starter/src/main/java/org/apache/camel/component/ganglia/springboot/GangliaComponentAutoConfiguration.java
+++ b/components-starter/camel-ganglia-starter/src/main/java/org/apache/camel/component/ganglia/springboot/GangliaComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(GangliaComponentAutoConfiguration.Condition.class)
public class GangliaComponentAutoConfiguration {
+ @Lazy
@Bean(name = "ganglia-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(GangliaComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-google-calendar-starter/src/main/java/org/apache/camel/component/google/calendar/springboot/GoogleCalendarComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-google-calendar-starter/src/main/java/org/apache/camel/component/google/calendar/springboot/GoogleCalendarComponentAutoConfiguration.java b/components-starter/camel-google-calendar-starter/src/main/java/org/apache/camel/component/google/calendar/springboot/GoogleCalendarComponentAutoConfiguration.java
index 088bf4a..e0fb19e 100644
--- a/components-starter/camel-google-calendar-starter/src/main/java/org/apache/camel/component/google/calendar/springboot/GoogleCalendarComponentAutoConfiguration.java
+++ b/components-starter/camel-google-calendar-starter/src/main/java/org/apache/camel/component/google/calendar/springboot/GoogleCalendarComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(GoogleCalendarComponentAutoConfiguration.Condition.class)
public class GoogleCalendarComponentAutoConfiguration {
+ @Lazy
@Bean(name = "google-calendar-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(GoogleCalendarComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-google-drive-starter/src/main/java/org/apache/camel/component/google/drive/springboot/GoogleDriveComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-google-drive-starter/src/main/java/org/apache/camel/component/google/drive/springboot/GoogleDriveComponentAutoConfiguration.java b/components-starter/camel-google-drive-starter/src/main/java/org/apache/camel/component/google/drive/springboot/GoogleDriveComponentAutoConfiguration.java
index 30978eb..4090f05 100644
--- a/components-starter/camel-google-drive-starter/src/main/java/org/apache/camel/component/google/drive/springboot/GoogleDriveComponentAutoConfiguration.java
+++ b/components-starter/camel-google-drive-starter/src/main/java/org/apache/camel/component/google/drive/springboot/GoogleDriveComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(GoogleDriveComponentAutoConfiguration.Condition.class)
public class GoogleDriveComponentAutoConfiguration {
+ @Lazy
@Bean(name = "google-drive-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(GoogleDriveComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentAutoConfiguration.java b/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentAutoConfiguration.java
index 21e90be..0d51d7c 100644
--- a/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentAutoConfiguration.java
+++ b/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(GoogleMailComponentAutoConfiguration.Condition.class)
public class GoogleMailComponentAutoConfiguration {
+ @Lazy
@Bean(name = "google-mail-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(GoogleMailComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java b/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java
index bf247a8..834d60f 100644
--- a/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java
+++ b/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(GuavaEventBusComponentAutoConfiguration.Condition.class)
public class GuavaEventBusComponentAutoConfiguration {
+ @Lazy
@Bean(name = "guava-eventbus-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(GuavaEventBusComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java b/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java
index 114197d..4b9229c 100644
--- a/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java
+++ b/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(HazelcastComponentAutoConfiguration.Condition.class)
public class HazelcastComponentAutoConfiguration {
+ @Lazy
@Bean(name = "hazelcast-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(HazelcastComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java b/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java
index 0509861..decdd43 100644
--- a/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java
+++ b/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(HBaseComponentAutoConfiguration.Condition.class)
public class HBaseComponentAutoConfiguration {
+ @Lazy
@Bean(name = "hbase-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(HBaseComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java b/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java
index 44541f8..2e35e01 100644
--- a/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java
+++ b/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(HdfsComponentAutoConfiguration.Condition.class)
public class HdfsComponentAutoConfiguration {
+ @Lazy
@Bean(name = "hdfs-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(HdfsComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java b/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java
index c169001..16c8bd6 100644
--- a/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java
+++ b/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(HdfsComponentAutoConfiguration.Condition.class)
public class HdfsComponentAutoConfiguration {
+ @Lazy
@Bean(name = "hdfs2-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(HdfsComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java b/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java
index 062960c..f1e8d9e 100644
--- a/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java
+++ b/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(HttpComponentAutoConfiguration.Condition.class)
public class HttpComponentAutoConfiguration {
+ @Lazy
@Bean(name = {"http-component", "https-component"})
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(HttpComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java b/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
index 38e92d9..9febf78 100644
--- a/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
+++ b/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(HttpComponentAutoConfiguration.Condition.class)
public class HttpComponentAutoConfiguration {
+ @Lazy
@Bean(name = "http4-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(HttpComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java b/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java
index e8a62a4..7e6720b 100644
--- a/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java
+++ b/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(JdbcComponentAutoConfiguration.Condition.class)
public class JdbcComponentAutoConfiguration {
+ @Lazy
@Bean(name = "jdbc-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JdbcComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java b/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java
index c96866f..2d11b0c 100644
--- a/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java
+++ b/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(JettyHttpComponentAutoConfiguration9.Condition.class)
public class JettyHttpComponentAutoConfiguration9 {
+ @Lazy
@Bean(name = "jetty-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JettyHttpComponent9.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java b/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java
index 1b4628e..ce7ea86 100644
--- a/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java
+++ b/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(JGroupsComponentAutoConfiguration.Condition.class)
public class JGroupsComponentAutoConfiguration {
+ @Lazy
@Bean(name = "jgroups-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JGroupsComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java b/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java
index e48b715..4e042a9 100644
--- a/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java
+++ b/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(JmsComponentAutoConfiguration.Condition.class)
public class JmsComponentAutoConfiguration {
+ @Lazy
@Bean(name = "jms-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JmsComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-jolt-starter/src/main/java/org/apache/camel/component/jolt/springboot/JoltComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jolt-starter/src/main/java/org/apache/camel/component/jolt/springboot/JoltComponentAutoConfiguration.java b/components-starter/camel-jolt-starter/src/main/java/org/apache/camel/component/jolt/springboot/JoltComponentAutoConfiguration.java
index 320e5f4..afcfde3 100644
--- a/components-starter/camel-jolt-starter/src/main/java/org/apache/camel/component/jolt/springboot/JoltComponentAutoConfiguration.java
+++ b/components-starter/camel-jolt-starter/src/main/java/org/apache/camel/component/jolt/springboot/JoltComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(JoltComponentAutoConfiguration.Condition.class)
public class JoltComponentAutoConfiguration {
+ @Lazy
@Bean(name = "jolt-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JoltComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentAutoConfiguration.java b/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentAutoConfiguration.java
index e639db8..666730e 100644
--- a/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentAutoConfiguration.java
+++ b/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(JpaComponentAutoConfiguration.Condition.class)
public class JpaComponentAutoConfiguration {
+ @Lazy
@Bean(name = "jpa-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JpaComponent.class)
http://git-wip-us.apache.org/repos/asf/camel/blob/82ba1b80/components-starter/camel-jsch-starter/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jsch-starter/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentAutoConfiguration.java b/components-starter/camel-jsch-starter/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentAutoConfiguration.java
index 0285502..6151505 100644
--- a/components-starter/camel-jsch-starter/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentAutoConfiguration.java
+++ b/components-starter/camel-jsch-starter/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentAutoConfiguration.java
@@ -32,6 +32,7 @@ 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;
/**
@@ -42,6 +43,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
@Conditional(ScpComponentAutoConfiguration.Condition.class)
public class ScpComponentAutoConfiguration {
+ @Lazy
@Bean(name = "scp-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ScpComponent.class)
[06/15] camel git commit: CAMEL-10550: re-generated starters
Posted by lb...@apache.org.
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatAutoConfiguration.java b/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatAutoConfiguration.java
index c035d7d..e09a8c3 100644
--- a/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatAutoConfiguration.java
+++ b/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.component.jacksonxml.JacksonXMLDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JacksonXMLDataFormatConfiguration.class)
+@Conditional(JacksonXMLDataFormatAutoConfiguration.Condition.class)
public class JacksonXMLDataFormatAutoConfiguration {
@Bean(name = "jacksonxml-dataformat")
@@ -52,4 +60,29 @@ public class JacksonXMLDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.jacksonxml");
+ if (isEnabled(conditionContext, "camel.dataformat.jacksonxml.",
+ 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/2f9a99cc/components-starter/camel-jacksonxml-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jacksonxml-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jacksonxml-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..7b365ae
--- /dev/null
+++ b/components-starter/camel-jacksonxml-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.jacksonxml.enabled",
+ "description": "Enable jacksonxml dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jaxb-starter/src/main/java/org/apache/camel/converter/jaxb/springboot/JaxbDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jaxb-starter/src/main/java/org/apache/camel/converter/jaxb/springboot/JaxbDataFormatAutoConfiguration.java b/components-starter/camel-jaxb-starter/src/main/java/org/apache/camel/converter/jaxb/springboot/JaxbDataFormatAutoConfiguration.java
index 846e518..ddc030a 100644
--- a/components-starter/camel-jaxb-starter/src/main/java/org/apache/camel/converter/jaxb/springboot/JaxbDataFormatAutoConfiguration.java
+++ b/components-starter/camel-jaxb-starter/src/main/java/org/apache/camel/converter/jaxb/springboot/JaxbDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.converter.jaxb.JaxbDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JaxbDataFormatConfiguration.class)
+@Conditional(JaxbDataFormatAutoConfiguration.Condition.class)
public class JaxbDataFormatAutoConfiguration {
@Bean(name = "jaxb-dataformat")
@@ -51,4 +59,29 @@ public class JaxbDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.jaxb");
+ if (isEnabled(conditionContext, "camel.dataformat.jaxb.",
+ 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/2f9a99cc/components-starter/camel-jaxb-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jaxb-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jaxb-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..671d003
--- /dev/null
+++ b/components-starter/camel-jaxb-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.jaxb.enabled",
+ "description": "Enable jaxb dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java b/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java
index b613e7f..e8a62a4 100644
--- a/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java
+++ b/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.jdbc.JdbcComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JdbcComponentConfiguration.class)
+@Conditional(JdbcComponentAutoConfiguration.Condition.class)
public class JdbcComponentAutoConfiguration {
@Bean(name = "jdbc-component")
@@ -68,4 +76,29 @@ public class JdbcComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.jdbc");
+ if (isEnabled(conditionContext, "camel.component.jdbc.",
+ 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/2f9a99cc/components-starter/camel-jdbc-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jdbc-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jdbc-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..3c34901
--- /dev/null
+++ b/components-starter/camel-jdbc-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.jdbc.enabled",
+ "description": "Enable jdbc component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java b/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java
index 24d1213..c96866f 100644
--- a/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java
+++ b/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.jetty9.JettyHttpComponent9;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JettyHttpComponentConfiguration9.class)
+@Conditional(JettyHttpComponentAutoConfiguration9.Condition.class)
public class JettyHttpComponentAutoConfiguration9 {
@Bean(name = "jetty-component")
@@ -69,4 +77,29 @@ public class JettyHttpComponentAutoConfiguration9 {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.jetty");
+ if (isEnabled(conditionContext, "camel.component.jetty.",
+ 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/2f9a99cc/components-starter/camel-jetty9-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jetty9-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jetty9-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..c6a3b5a
--- /dev/null
+++ b/components-starter/camel-jetty9-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.jetty.enabled",
+ "description": "Enable jetty component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java b/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java
index e8ad026..1b4628e 100644
--- a/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java
+++ b/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.jgroups.JGroupsComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JGroupsComponentConfiguration.class)
+@Conditional(JGroupsComponentAutoConfiguration.Condition.class)
public class JGroupsComponentAutoConfiguration {
@Bean(name = "jgroups-component")
@@ -69,4 +77,29 @@ public class JGroupsComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.jgroups");
+ if (isEnabled(conditionContext, "camel.component.jgroups.",
+ 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/2f9a99cc/components-starter/camel-jgroups-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jgroups-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jgroups-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..0caff55
--- /dev/null
+++ b/components-starter/camel-jgroups-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.jgroups.enabled",
+ "description": "Enable jgroups component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jibx-starter/src/main/java/org/apache/camel/dataformat/jibx/springboot/JibxDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jibx-starter/src/main/java/org/apache/camel/dataformat/jibx/springboot/JibxDataFormatAutoConfiguration.java b/components-starter/camel-jibx-starter/src/main/java/org/apache/camel/dataformat/jibx/springboot/JibxDataFormatAutoConfiguration.java
index 10a3fa5..a8ea649 100644
--- a/components-starter/camel-jibx-starter/src/main/java/org/apache/camel/dataformat/jibx/springboot/JibxDataFormatAutoConfiguration.java
+++ b/components-starter/camel-jibx-starter/src/main/java/org/apache/camel/dataformat/jibx/springboot/JibxDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.jibx.JibxDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JibxDataFormatConfiguration.class)
+@Conditional(JibxDataFormatAutoConfiguration.Condition.class)
public class JibxDataFormatAutoConfiguration {
@Bean(name = "jibx-dataformat")
@@ -51,4 +59,29 @@ public class JibxDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.jibx");
+ if (isEnabled(conditionContext, "camel.dataformat.jibx.",
+ 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/2f9a99cc/components-starter/camel-jibx-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jibx-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jibx-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..1bd5ddb
--- /dev/null
+++ b/components-starter/camel-jibx-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.jibx.enabled",
+ "description": "Enable jibx dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java b/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java
index 94f524a..e48b715 100644
--- a/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java
+++ b/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.jms.JmsComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JmsComponentConfiguration.class)
+@Conditional(JmsComponentAutoConfiguration.Condition.class)
public class JmsComponentAutoConfiguration {
@Bean(name = "jms-component")
@@ -68,4 +76,29 @@ public class JmsComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.jms");
+ if (isEnabled(conditionContext, "camel.component.jms.",
+ 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/2f9a99cc/components-starter/camel-jms-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jms-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jms-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..4c463ba
--- /dev/null
+++ b/components-starter/camel-jms-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.jms.enabled",
+ "description": "Enable jms component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatAutoConfiguration.java b/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatAutoConfiguration.java
index ae1eb60..9f9870c 100644
--- a/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatAutoConfiguration.java
+++ b/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.component.johnzon.JohnzonDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JohnzonDataFormatConfiguration.class)
+@Conditional(JohnzonDataFormatAutoConfiguration.Condition.class)
public class JohnzonDataFormatAutoConfiguration {
@Bean(name = "json-johnzon-dataformat")
@@ -52,4 +60,29 @@ public class JohnzonDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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-johnzon");
+ if (isEnabled(conditionContext, "camel.dataformat.json-johnzon.",
+ 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/2f9a99cc/components-starter/camel-johnzon-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-johnzon-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-johnzon-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..7450b29
--- /dev/null
+++ b/components-starter/camel-johnzon-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.json-johnzon.enabled",
+ "description": "Enable json-johnzon dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jolt-starter/src/main/java/org/apache/camel/component/jolt/springboot/JoltComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jolt-starter/src/main/java/org/apache/camel/component/jolt/springboot/JoltComponentAutoConfiguration.java b/components-starter/camel-jolt-starter/src/main/java/org/apache/camel/component/jolt/springboot/JoltComponentAutoConfiguration.java
index ca21556..320e5f4 100644
--- a/components-starter/camel-jolt-starter/src/main/java/org/apache/camel/component/jolt/springboot/JoltComponentAutoConfiguration.java
+++ b/components-starter/camel-jolt-starter/src/main/java/org/apache/camel/component/jolt/springboot/JoltComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.jolt.JoltComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JoltComponentConfiguration.class)
+@Conditional(JoltComponentAutoConfiguration.Condition.class)
public class JoltComponentAutoConfiguration {
@Bean(name = "jolt-component")
@@ -68,4 +76,29 @@ public class JoltComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.jolt");
+ if (isEnabled(conditionContext, "camel.component.jolt.",
+ 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/2f9a99cc/components-starter/camel-jolt-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jolt-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jolt-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..2afac1a
--- /dev/null
+++ b/components-starter/camel-jolt-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.jolt.enabled",
+ "description": "Enable jolt component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-josql-starter/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-josql-starter/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java b/components-starter/camel-josql-starter/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java
index 0a1a0e9..1a3bb93 100644
--- a/components-starter/camel-josql-starter/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java
+++ b/components-starter/camel-josql-starter/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.sql.SqlLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SqlLanguageConfiguration.class)
+@Conditional(SqlLanguageAutoConfiguration.Condition.class)
public class SqlLanguageAutoConfiguration {
@Bean(name = "sql-language")
@@ -51,4 +59,28 @@ public class SqlLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.sql");
+ if (isEnabled(conditionContext, "camel.language.sql.", 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/2f9a99cc/components-starter/camel-josql-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-josql-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-josql-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..2fd5f81
--- /dev/null
+++ b/components-starter/camel-josql-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.language.sql.enabled",
+ "description": "Enable sql language",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentAutoConfiguration.java b/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentAutoConfiguration.java
index 0101611..e639db8 100644
--- a/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentAutoConfiguration.java
+++ b/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.jpa.JpaComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JpaComponentConfiguration.class)
+@Conditional(JpaComponentAutoConfiguration.Condition.class)
public class JpaComponentAutoConfiguration {
@Bean(name = "jpa-component")
@@ -68,4 +76,29 @@ public class JpaComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.jpa");
+ if (isEnabled(conditionContext, "camel.component.jpa.",
+ 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/2f9a99cc/components-starter/camel-jpa-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jpa-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jpa-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..0b5632a
--- /dev/null
+++ b/components-starter/camel-jpa-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.jpa.enabled",
+ "description": "Enable jpa component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jsch-starter/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jsch-starter/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentAutoConfiguration.java b/components-starter/camel-jsch-starter/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentAutoConfiguration.java
index 9509915..0285502 100644
--- a/components-starter/camel-jsch-starter/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentAutoConfiguration.java
+++ b/components-starter/camel-jsch-starter/src/main/java/org/apache/camel/component/scp/springboot/ScpComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.scp.ScpComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ScpComponentConfiguration.class)
+@Conditional(ScpComponentAutoConfiguration.Condition.class)
public class ScpComponentAutoConfiguration {
@Bean(name = "scp-component")
@@ -68,4 +76,29 @@ public class ScpComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.scp");
+ if (isEnabled(conditionContext, "camel.component.scp.",
+ 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/2f9a99cc/components-starter/camel-jsch-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jsch-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jsch-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..0848afe
--- /dev/null
+++ b/components-starter/camel-jsch-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.scp.enabled",
+ "description": "Enable scp component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jsonpath-starter/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jsonpath-starter/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.java b/components-starter/camel-jsonpath-starter/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.java
index 2c3e9fe..138adbd 100644
--- a/components-starter/camel-jsonpath-starter/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.java
+++ b/components-starter/camel-jsonpath-starter/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.jsonpath.JsonPathLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JsonPathLanguageConfiguration.class)
+@Conditional(JsonPathLanguageAutoConfiguration.Condition.class)
public class JsonPathLanguageAutoConfiguration {
@Bean(name = "jsonpath-language")
@@ -52,4 +60,29 @@ public class JsonPathLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.jsonpath");
+ if (isEnabled(conditionContext, "camel.language.jsonpath.",
+ 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/2f9a99cc/components-starter/camel-jsonpath-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jsonpath-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jsonpath-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..8eb7115
--- /dev/null
+++ b/components-starter/camel-jsonpath-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.language.jsonpath.enabled",
+ "description": "Enable jsonpath language",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jt400-starter/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jt400-starter/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.java b/components-starter/camel-jt400-starter/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.java
index 1c1e4a8..d8c2909 100644
--- a/components-starter/camel-jt400-starter/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.java
+++ b/components-starter/camel-jt400-starter/src/main/java/org/apache/camel/component/jt400/springboot/Jt400ComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.jt400.Jt400Component;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(Jt400ComponentConfiguration.class)
+@Conditional(Jt400ComponentAutoConfiguration.Condition.class)
public class Jt400ComponentAutoConfiguration {
@Bean(name = "jt400-component")
@@ -68,4 +76,29 @@ public class Jt400ComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.jt400");
+ if (isEnabled(conditionContext, "camel.component.jt400.",
+ 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/2f9a99cc/components-starter/camel-jt400-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jt400-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jt400-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..36d99ef
--- /dev/null
+++ b/components-starter/camel-jt400-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.jt400.enabled",
+ "description": "Enable jt400 component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-juel-starter/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-juel-starter/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java b/components-starter/camel-juel-starter/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java
index 376e30e..44383a2 100644
--- a/components-starter/camel-juel-starter/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java
+++ b/components-starter/camel-juel-starter/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.juel.JuelLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JuelLanguageConfiguration.class)
+@Conditional(JuelLanguageAutoConfiguration.Condition.class)
public class JuelLanguageAutoConfiguration {
@Bean(name = "el-language")
@@ -51,4 +59,28 @@ public class JuelLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.el");
+ if (isEnabled(conditionContext, "camel.language.el.", 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/2f9a99cc/components-starter/camel-juel-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-juel-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-juel-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..6cbadf8
--- /dev/null
+++ b/components-starter/camel-juel-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.language.el.enabled",
+ "description": "Enable el language",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-jxpath-starter/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jxpath-starter/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java b/components-starter/camel-jxpath-starter/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java
index a0e2c92..e48d684 100644
--- a/components-starter/camel-jxpath-starter/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java
+++ b/components-starter/camel-jxpath-starter/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.jxpath.JXPathLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(JXPathLanguageConfiguration.class)
+@Conditional(JXPathLanguageAutoConfiguration.Condition.class)
public class JXPathLanguageAutoConfiguration {
@Bean(name = "jxpath-language")
@@ -51,4 +59,29 @@ public class JXPathLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.jxpath");
+ if (isEnabled(conditionContext, "camel.language.jxpath.",
+ 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/2f9a99cc/components-starter/camel-jxpath-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-jxpath-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-jxpath-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..2334520
--- /dev/null
+++ b/components-starter/camel-jxpath-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.language.jxpath.enabled",
+ "description": "Enable jxpath language",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.java b/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.java
index 0780a0b..dfc6101 100644
--- a/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.java
+++ b/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.kafka.KafkaComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(KafkaComponentConfiguration.class)
+@Conditional(KafkaComponentAutoConfiguration.Condition.class)
public class KafkaComponentAutoConfiguration {
@Bean(name = "kafka-component")
@@ -68,4 +76,29 @@ public class KafkaComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.kafka");
+ if (isEnabled(conditionContext, "camel.component.kafka.",
+ 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/2f9a99cc/components-starter/camel-kafka-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-kafka-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-kafka-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..188d742
--- /dev/null
+++ b/components-starter/camel-kafka-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.kafka.enabled",
+ "description": "Enable kafka component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-kestrel-starter/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-kestrel-starter/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.java b/components-starter/camel-kestrel-starter/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.java
index 1bd0d5b..fa54651 100644
--- a/components-starter/camel-kestrel-starter/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.java
+++ b/components-starter/camel-kestrel-starter/src/main/java/org/apache/camel/component/kestrel/springboot/KestrelComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.kestrel.KestrelComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(KestrelComponentConfiguration.class)
+@Conditional(KestrelComponentAutoConfiguration.Condition.class)
public class KestrelComponentAutoConfiguration {
@Bean(name = "kestrel-component")
@@ -69,4 +77,29 @@ public class KestrelComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.kestrel");
+ if (isEnabled(conditionContext, "camel.component.kestrel.",
+ 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/2f9a99cc/components-starter/camel-kestrel-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-kestrel-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-kestrel-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..88016b7
--- /dev/null
+++ b/components-starter/camel-kestrel-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.kestrel.enabled",
+ "description": "Enable kestrel component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-linkedin-starter/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-linkedin-starter/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.java b/components-starter/camel-linkedin-starter/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.java
index 2be385e..519bd93 100644
--- a/components-starter/camel-linkedin-starter/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.java
+++ b/components-starter/camel-linkedin-starter/src/main/java/org/apache/camel/component/linkedin/springboot/LinkedInComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.linkedin.LinkedInComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(LinkedInComponentConfiguration.class)
+@Conditional(LinkedInComponentAutoConfiguration.Condition.class)
public class LinkedInComponentAutoConfiguration {
@Bean(name = "linkedin-component")
@@ -69,4 +77,29 @@ public class LinkedInComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.linkedin");
+ if (isEnabled(conditionContext, "camel.component.linkedin.",
+ 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/2f9a99cc/components-starter/camel-linkedin-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-linkedin-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-linkedin-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..ea5985b
--- /dev/null
+++ b/components-starter/camel-linkedin-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.linkedin.enabled",
+ "description": "Enable linkedin component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-lucene-starter/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-lucene-starter/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.java b/components-starter/camel-lucene-starter/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.java
index b770cd2..4319552 100644
--- a/components-starter/camel-lucene-starter/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.java
+++ b/components-starter/camel-lucene-starter/src/main/java/org/apache/camel/component/lucene/springboot/LuceneComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.lucene.LuceneComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(LuceneComponentConfiguration.class)
+@Conditional(LuceneComponentAutoConfiguration.Condition.class)
public class LuceneComponentAutoConfiguration {
@Bean(name = "lucene-component")
@@ -68,4 +76,29 @@ public class LuceneComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.lucene");
+ if (isEnabled(conditionContext, "camel.component.lucene.",
+ 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
[09/15] camel git commit: CAMEL-10550: re-generated starters
Posted by lb...@apache.org.
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-box-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-box-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-box-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..3bc581e
--- /dev/null
+++ b/components-starter/camel-box-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.box.enabled",
+ "description": "Enable box component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-braintree-starter/src/main/java/org/apache/camel/component/braintree/springboot/BraintreeComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-braintree-starter/src/main/java/org/apache/camel/component/braintree/springboot/BraintreeComponentAutoConfiguration.java b/components-starter/camel-braintree-starter/src/main/java/org/apache/camel/component/braintree/springboot/BraintreeComponentAutoConfiguration.java
index 50aa4ba..36ec40d 100644
--- a/components-starter/camel-braintree-starter/src/main/java/org/apache/camel/component/braintree/springboot/BraintreeComponentAutoConfiguration.java
+++ b/components-starter/camel-braintree-starter/src/main/java/org/apache/camel/component/braintree/springboot/BraintreeComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.braintree.BraintreeComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(BraintreeComponentConfiguration.class)
+@Conditional(BraintreeComponentAutoConfiguration.Condition.class)
public class BraintreeComponentAutoConfiguration {
@Bean(name = "braintree-component")
@@ -69,4 +77,29 @@ public class BraintreeComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.braintree");
+ if (isEnabled(conditionContext, "camel.component.braintree.",
+ 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/2f9a99cc/components-starter/camel-braintree-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-braintree-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-braintree-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..7f5ec6c
--- /dev/null
+++ b/components-starter/camel-braintree-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.braintree.enabled",
+ "description": "Enable braintree component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentAutoConfiguration.java b/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentAutoConfiguration.java
index 3ff3096..aa68da4 100644
--- a/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentAutoConfiguration.java
+++ b/components-starter/camel-cache-starter/src/main/java/org/apache/camel/component/cache/springboot/CacheComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.cache.CacheComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(CacheComponentConfiguration.class)
+@Conditional(CacheComponentAutoConfiguration.Condition.class)
public class CacheComponentAutoConfiguration {
@Bean(name = "cache-component")
@@ -68,4 +76,29 @@ public class CacheComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.cache");
+ if (isEnabled(conditionContext, "camel.component.cache.",
+ 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/2f9a99cc/components-starter/camel-cache-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-cache-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-cache-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..d567de9
--- /dev/null
+++ b/components-starter/camel-cache-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.cache.enabled",
+ "description": "Enable cache component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-castor-starter/src/main/java/org/apache/camel/dataformat/castor/springboot/CastorDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-castor-starter/src/main/java/org/apache/camel/dataformat/castor/springboot/CastorDataFormatAutoConfiguration.java b/components-starter/camel-castor-starter/src/main/java/org/apache/camel/dataformat/castor/springboot/CastorDataFormatAutoConfiguration.java
index f7bb885..311f1fd 100644
--- a/components-starter/camel-castor-starter/src/main/java/org/apache/camel/dataformat/castor/springboot/CastorDataFormatAutoConfiguration.java
+++ b/components-starter/camel-castor-starter/src/main/java/org/apache/camel/dataformat/castor/springboot/CastorDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.dataformat.castor.CastorDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(CastorDataFormatConfiguration.class)
+@Conditional(CastorDataFormatAutoConfiguration.Condition.class)
public class CastorDataFormatAutoConfiguration {
@Bean(name = "castor-dataformat")
@@ -52,4 +60,29 @@ public class CastorDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.castor");
+ if (isEnabled(conditionContext, "camel.dataformat.castor.",
+ 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/2f9a99cc/components-starter/camel-castor-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-castor-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-castor-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..1415979
--- /dev/null
+++ b/components-starter/camel-castor-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.dataformat.castor.enabled",
+ "description": "Enable castor dataformat",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java b/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java
index 87080c6..4f7acd9 100644
--- a/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java
+++ b/components-starter/camel-cometd-starter/src/main/java/org/apache/camel/component/cometd/springboot/CometdComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.cometd.CometdComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(CometdComponentConfiguration.class)
+@Conditional(CometdComponentAutoConfiguration.Condition.class)
public class CometdComponentAutoConfiguration {
@Bean(name = {"cometd-component", "cometds-component"})
@@ -68,4 +76,29 @@ public class CometdComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.cometd");
+ if (isEnabled(conditionContext, "camel.component.cometd.",
+ 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/2f9a99cc/components-starter/camel-cometd-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
----------------------------------------------------------------------
diff --git a/components-starter/camel-cometd-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/components-starter/camel-cometd-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..03cf524
--- /dev/null
+++ b/components-starter/camel-cometd-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+ "properties": [
+ {
+ "defaultValue": true,
+ "name": "camel.component.cometd.enabled",
+ "description": "Enable cometd component",
+ "type": "java.lang.Boolean"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java
index 75533f5..3de1834 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.direct.DirectComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(DirectComponentConfiguration.class)
+@Conditional(DirectComponentAutoConfiguration.Condition.class)
public class DirectComponentAutoConfiguration {
@Bean(name = "direct-component")
@@ -68,4 +76,29 @@ public class DirectComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.direct");
+ if (isEnabled(conditionContext, "camel.component.direct.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java
index 8b5c5a8..919a350 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.directvm.DirectVmComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(DirectVmComponentConfiguration.class)
+@Conditional(DirectVmComponentAutoConfiguration.Condition.class)
public class DirectVmComponentAutoConfiguration {
@Bean(name = "direct-vm-component")
@@ -69,4 +77,29 @@ public class DirectVmComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.direct-vm");
+ if (isEnabled(conditionContext, "camel.component.direct-vm.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java
index 79b0fb0..9838a55 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/log/springboot/LogComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.log.LogComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(LogComponentConfiguration.class)
+@Conditional(LogComponentAutoConfiguration.Condition.class)
public class LogComponentAutoConfiguration {
@Bean(name = "log-component")
@@ -68,4 +76,29 @@ public class LogComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.log");
+ if (isEnabled(conditionContext, "camel.component.log.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java
index 9ea63c5..22a2153 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.properties.PropertiesComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(PropertiesComponentConfiguration.class)
+@Conditional(PropertiesComponentAutoConfiguration.Condition.class)
public class PropertiesComponentAutoConfiguration {
@Bean(name = "properties-component")
@@ -69,4 +77,29 @@ public class PropertiesComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.properties");
+ if (isEnabled(conditionContext, "camel.component.properties.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java
index 5010365..761e316 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/rest/springboot/RestComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.rest.RestComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(RestComponentConfiguration.class)
+@Conditional(RestComponentAutoConfiguration.Condition.class)
public class RestComponentAutoConfiguration {
@Bean(name = "rest-component")
@@ -68,4 +76,29 @@ public class RestComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.rest");
+ if (isEnabled(conditionContext, "camel.component.rest.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java
index 09a56a7..41404d2 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.scheduler.SchedulerComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SchedulerComponentConfiguration.class)
+@Conditional(SchedulerComponentAutoConfiguration.Condition.class)
public class SchedulerComponentAutoConfiguration {
@Bean(name = "scheduler-component")
@@ -69,4 +77,29 @@ public class SchedulerComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.scheduler");
+ if (isEnabled(conditionContext, "camel.component.scheduler.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java
index 09e9357..ccfe0ea 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.seda.SedaComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SedaComponentConfiguration.class)
+@Conditional(SedaComponentAutoConfiguration.Condition.class)
public class SedaComponentAutoConfiguration {
@Bean(name = "seda-component")
@@ -68,4 +76,29 @@ public class SedaComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.seda");
+ if (isEnabled(conditionContext, "camel.component.seda.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java
index 8b1de4f..7e8c1f6 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/stub/springboot/StubComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.stub.StubComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(StubComponentConfiguration.class)
+@Conditional(StubComponentAutoConfiguration.Condition.class)
public class StubComponentAutoConfiguration {
@Bean(name = "stub-component")
@@ -68,4 +76,29 @@ public class StubComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.stub");
+ if (isEnabled(conditionContext, "camel.component.stub.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java
index a081945..fc0e834 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/validator/springboot/ValidatorComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.validator.ValidatorComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ValidatorComponentConfiguration.class)
+@Conditional(ValidatorComponentAutoConfiguration.Condition.class)
public class ValidatorComponentAutoConfiguration {
@Bean(name = "validator-component")
@@ -69,4 +77,29 @@ public class ValidatorComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.validator");
+ if (isEnabled(conditionContext, "camel.component.validator.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java
index 634bc3f..acc966a 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/vm/springboot/VmComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.vm.VmComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(VmComponentConfiguration.class)
+@Conditional(VmComponentAutoConfiguration.Condition.class)
public class VmComponentAutoConfiguration {
@Bean(name = "vm-component")
@@ -68,4 +76,28 @@ public class VmComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.vm");
+ if (isEnabled(conditionContext, "camel.component.vm.", 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java
index ae5ea0e..c28101a 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/xslt/springboot/XsltComponentAutoConfiguration.java
@@ -21,17 +21,25 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.component.xslt.XsltComponent;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(XsltComponentConfiguration.class)
+@Conditional(XsltComponentAutoConfiguration.Condition.class)
public class XsltComponentAutoConfiguration {
@Bean(name = "xslt-component")
@@ -68,4 +76,29 @@ public class XsltComponentAutoConfiguration {
camelContext.getTypeConverter(), component, parameters);
return component;
}
+
+ 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.xslt");
+ if (isEnabled(conditionContext, "camel.component.xslt.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatAutoConfiguration.java
index aaff31d..828a263 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/GzipDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.impl.GzipDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(GzipDataFormatConfiguration.class)
+@Conditional(GzipDataFormatAutoConfiguration.Condition.class)
public class GzipDataFormatAutoConfiguration {
@Bean(name = "gzip-dataformat")
@@ -51,4 +59,29 @@ public class GzipDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.gzip");
+ if (isEnabled(conditionContext, "camel.dataformat.gzip.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatAutoConfiguration.java
index fbcc1a7..3481aed 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/SerializationDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.impl.SerializationDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(SerializationDataFormatConfiguration.class)
+@Conditional(SerializationDataFormatAutoConfiguration.Condition.class)
public class SerializationDataFormatAutoConfiguration {
@Bean(name = "serialization-dataformat")
@@ -53,4 +61,29 @@ public class SerializationDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.serialization");
+ if (isEnabled(conditionContext, "camel.dataformat.serialization.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatAutoConfiguration.java
index 35daf7b..f0d9e1a 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/StringDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.impl.StringDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(StringDataFormatConfiguration.class)
+@Conditional(StringDataFormatAutoConfiguration.Condition.class)
public class StringDataFormatAutoConfiguration {
@Bean(name = "string-dataformat")
@@ -52,4 +60,29 @@ public class StringDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.string");
+ if (isEnabled(conditionContext, "camel.dataformat.string.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatAutoConfiguration.java
index bc1170d..4f2ce8f 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/impl/springboot/ZipDataFormatAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.impl.ZipDataFormat;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ZipDataFormatConfiguration.class)
+@Conditional(ZipDataFormatAutoConfiguration.Condition.class)
public class ZipDataFormatAutoConfiguration {
@Bean(name = "zip-dataformat")
@@ -51,4 +59,29 @@ public class ZipDataFormatAutoConfiguration {
camelContext.getTypeConverter(), dataformat, parameters);
return dataformat;
}
+
+ 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.zip");
+ if (isEnabled(conditionContext, "camel.dataformat.zip.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java
index d059788..b71f03d 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.bean.BeanLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(BeanLanguageConfiguration.class)
+@Conditional(BeanLanguageAutoConfiguration.Condition.class)
public class BeanLanguageAutoConfiguration {
@Bean(name = "bean-language")
@@ -51,4 +59,29 @@ public class BeanLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.bean");
+ if (isEnabled(conditionContext, "camel.language.bean.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.java
index 996c5d2..b9d25a2 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.constant.ConstantLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ConstantLanguageConfiguration.class)
+@Conditional(ConstantLanguageAutoConfiguration.Condition.class)
public class ConstantLanguageAutoConfiguration {
@Bean(name = "constant-language")
@@ -52,4 +60,29 @@ public class ConstantLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.constant");
+ if (isEnabled(conditionContext, "camel.language.constant.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java
index 93276ef..436636f 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.header.HeaderLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(HeaderLanguageConfiguration.class)
+@Conditional(HeaderLanguageAutoConfiguration.Condition.class)
public class HeaderLanguageAutoConfiguration {
@Bean(name = "header-language")
@@ -51,4 +59,29 @@ public class HeaderLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.header");
+ if (isEnabled(conditionContext, "camel.language.header.",
+ 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/2f9a99cc/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java
index 824866b..fd2393a 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java
@@ -22,17 +22,25 @@ import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.property.ExchangePropertyLanguage;
import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
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!
*/
@Configuration
@EnableConfigurationProperties(ExchangePropertyLanguageConfiguration.class)
+@Conditional(ExchangePropertyLanguageAutoConfiguration.Condition.class)
public class ExchangePropertyLanguageAutoConfiguration {
@Bean(name = "exchangeProperty-language")
@@ -53,4 +61,29 @@ public class ExchangePropertyLanguageAutoConfiguration {
camelContext.getTypeConverter(), language, parameters);
return language;
}
+
+ 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.exchangeproperty");
+ if (isEnabled(conditionContext, "camel.language.exchangeproperty.",
+ 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
[13/15] camel git commit: CAMEL-10552: spring-boot: make component
lazy loading
Posted by lb...@apache.org.
CAMEL-10552: spring-boot: make component lazy loading
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/63e4b801
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/63e4b801
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/63e4b801
Branch: refs/heads/camel-2.18.x
Commit: 63e4b801919624d74ba2c289189179294fb27a1c
Parents: 9ce3d18
Author: lburgazzoli <lb...@gmail.com>
Authored: Tue Dec 6 16:29:06 2016 +0100
Committer: lburgazzoli <lb...@gmail.com>
Committed: Tue Dec 6 16:29:06 2016 +0100
----------------------------------------------------------------------
.../camel/maven/packaging/SpringBootAutoConfigurationMojo.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/63e4b801/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 d7344c1..8ebe2f4 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
@@ -82,6 +82,7 @@ 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.context.annotation.Scope;
import org.springframework.core.type.AnnotatedTypeMetadata;
@@ -811,6 +812,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
// 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");