http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentConfiguration.java b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentConfiguration.java new file mode 100644 index 0000000..67ce178 --- /dev/null +++ b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/springboot/GoogleMailComponentConfiguration.java @@ -0,0 +1,56 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.google.mail.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.google.mail.GoogleMailConfiguration; +import org.apache.camel.component.google.mail.GoogleMailClientFactory; + +/** + * The google-mail component provides access to Google Mail. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.google-mail") +public class GoogleMailComponentConfiguration { + + /** + * To use the shared configuration + */ + private GoogleMailConfiguration configuration; + /** + * To use the GoogleCalendarClientFactory as factory for creating the + * client. Will by default use BatchGoogleMailClientFactory + */ + private GoogleMailClientFactory clientFactory; + + public GoogleMailConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(GoogleMailConfiguration configuration) { + this.configuration = configuration; + } + + public GoogleMailClientFactory getClientFactory() { + return clientFactory; + } + + public void setClientFactory(GoogleMailClientFactory clientFactory) { + this.clientFactory = clientFactory; + } +} \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-google-mail/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-google-mail/src/main/resources/META-INF/spring.factories b/components/camel-google-mail/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..0640543 --- /dev/null +++ b/components/camel-google-mail/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.google.mail.springboot.GoogleMailComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-guava-eventbus/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-guava-eventbus/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java b/components/camel-guava-eventbus/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java new file mode 100644 index 0000000..3d56cb1 --- /dev/null +++ b/components/camel-guava-eventbus/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.guava.eventbus.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.guava.eventbus.GuavaEventBusComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(GuavaEventBusComponentConfiguration.class) +public class GuavaEventBusComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(GuavaEventBusComponent.class) + public GuavaEventBusComponent configureComponent(CamelContext camelContext, + GuavaEventBusComponentConfiguration configuration) throws Exception { + GuavaEventBusComponent component = new GuavaEventBusComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-guava-eventbus/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-guava-eventbus/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentConfiguration.java b/components/camel-guava-eventbus/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentConfiguration.java new file mode 100644 index 0000000..e669ac3 --- /dev/null +++ b/components/camel-guava-eventbus/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentConfiguration.java @@ -0,0 +1,59 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.guava.eventbus.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import com.google.common.eventbus.EventBus; + +/** + * The guava-eventbus component provides integration bridge between Camel and + * Google Guava EventBus. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.guava-eventbus") +public class GuavaEventBusComponentConfiguration { + + /** + * To use the given Guava EventBus instance + */ + private EventBus eventBus; + /** + * The interface with method(s) marked with the Subscribe annotation. + * Dynamic proxy will be created over the interface so it could be + * registered as the EventBus listener. Particularly useful when creating + * multi-event listeners and for handling DeadEvent properly. This option + * cannot be used together with eventClass option. + */ + private Class listenerInterface; + + public EventBus getEventBus() { + return eventBus; + } + + public void setEventBus(EventBus eventBus) { + this.eventBus = eventBus; + } + + public Class getListenerInterface() { + return listenerInterface; + } + + public void setListenerInterface(Class listenerInterface) { + this.listenerInterface = listenerInterface; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-guava-eventbus/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-guava-eventbus/src/main/resources/META-INF/spring.factories b/components/camel-guava-eventbus/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..c3fab29 --- /dev/null +++ b/components/camel-guava-eventbus/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.guava.eventbus.springboot.GuavaEventBusComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java new file mode 100644 index 0000000..057be33 --- /dev/null +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.hazelcast.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.hazelcast.HazelcastComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(HazelcastComponentConfiguration.class) +public class HazelcastComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(HazelcastComponent.class) + public HazelcastComponent configureComponent(CamelContext camelContext, + HazelcastComponentConfiguration configuration) throws Exception { + HazelcastComponent component = new HazelcastComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentConfiguration.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentConfiguration.java new file mode 100644 index 0000000..a755c13 --- /dev/null +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentConfiguration.java @@ -0,0 +1,45 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.hazelcast.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import com.hazelcast.core.HazelcastInstance; + +/** + * The hazelcast component allows you to work with the Hazelcast distributed + * data grid / cache. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.hazelcast") +public class HazelcastComponentConfiguration { + + /** + * The hazelcast instance reference which can be used for hazelcast + * endpoint. If you don't specify the instance reference camel use the + * default hazelcast instance from the camel-hazelcast instance. + */ + private HazelcastInstance hazelcastInstance; + + public HazelcastInstance getHazelcastInstance() { + return hazelcastInstance; + } + + public void setHazelcastInstance(HazelcastInstance hazelcastInstance) { + this.hazelcastInstance = hazelcastInstance; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-hazelcast/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-hazelcast/src/main/resources/META-INF/spring.factories b/components/camel-hazelcast/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..ea9aee3 --- /dev/null +++ b/components/camel-hazelcast/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.hazelcast.springboot.HazelcastComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java b/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java new file mode 100644 index 0000000..5ca5a71 --- /dev/null +++ b/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.hbase.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.hbase.HBaseComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(HBaseComponentConfiguration.class) +public class HBaseComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(HBaseComponent.class) + public HBaseComponent configureComponent(CamelContext camelContext, + HBaseComponentConfiguration configuration) throws Exception { + HBaseComponent component = new HBaseComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java b/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java new file mode 100644 index 0000000..5358a47 --- /dev/null +++ b/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java @@ -0,0 +1,55 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.hbase.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.hadoop.conf.Configuration; + +/** + * For reading/writing from/to an HBase store (Hadoop database). + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.hbase") +public class HBaseComponentConfiguration { + + /** + * To use the shared configuration + */ + private Configuration configuration; + /** + * Maximum number of references to keep for each table in the HTable pool. + * The default value is 10. + */ + private int poolMaxSize; + + public Configuration getConfiguration() { + return configuration; + } + + public void setConfiguration(Configuration configuration) { + this.configuration = configuration; + } + + public int getPoolMaxSize() { + return poolMaxSize; + } + + public void setPoolMaxSize(int poolMaxSize) { + this.poolMaxSize = poolMaxSize; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-hbase/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-hbase/src/main/resources/META-INF/spring.factories b/components/camel-hbase/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..f38fac0 --- /dev/null +++ b/components/camel-hbase/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.hbase.springboot.HBaseComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java new file mode 100644 index 0000000..1c0960a --- /dev/null +++ b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.hdfs.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.hdfs.HdfsComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(HdfsComponentConfiguration.class) +public class HdfsComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(HdfsComponent.class) + public HdfsComponent configureComponent(CamelContext camelContext, + HdfsComponentConfiguration configuration) throws Exception { + HdfsComponent component = new HdfsComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentConfiguration.java b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentConfiguration.java new file mode 100644 index 0000000..d8ab877 --- /dev/null +++ b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentConfiguration.java @@ -0,0 +1,42 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.hdfs.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import javax.security.auth.login.Configuration; + +/** + * For reading/writing from/to an HDFS filesystem using Hadoop 1.x. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.hdfs") +public class HdfsComponentConfiguration { + + /** + * To use the given configuration for security with JAAS. + */ + private Configuration jAASConfiguration; + + public Configuration getJAASConfiguration() { + return jAASConfiguration; + } + + public void setJAASConfiguration(Configuration jAASConfiguration) { + this.jAASConfiguration = jAASConfiguration; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-hdfs/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-hdfs/src/main/resources/META-INF/spring.factories b/components/camel-hdfs/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..ad3f96f --- /dev/null +++ b/components/camel-hdfs/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.hdfs.springboot.HdfsComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java new file mode 100644 index 0000000..fb76ec0 --- /dev/null +++ b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.hdfs2.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.hdfs2.HdfsComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(HdfsComponentConfiguration.class) +public class HdfsComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(HdfsComponent.class) + public HdfsComponent configureComponent(CamelContext camelContext, + HdfsComponentConfiguration configuration) throws Exception { + HdfsComponent component = new HdfsComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentConfiguration.java b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentConfiguration.java new file mode 100644 index 0000000..80d5bea --- /dev/null +++ b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentConfiguration.java @@ -0,0 +1,42 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.hdfs2.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import javax.security.auth.login.Configuration; + +/** + * For reading/writing from/to an HDFS filesystem using Hadoop 2.x. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.hdfs2") +public class HdfsComponentConfiguration { + + /** + * To use the given configuration for security with JAAS. + */ + private Configuration jAASConfiguration; + + public Configuration getJAASConfiguration() { + return jAASConfiguration; + } + + public void setJAASConfiguration(Configuration jAASConfiguration) { + this.jAASConfiguration = jAASConfiguration; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-hdfs2/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-hdfs2/src/main/resources/META-INF/spring.factories b/components/camel-hdfs2/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..a5b0dc9 --- /dev/null +++ b/components/camel-hdfs2/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.hdfs2.springboot.HdfsComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-http/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java b/components/camel-http/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java new file mode 100644 index 0000000..eb39d0f --- /dev/null +++ b/components/camel-http/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.http.HttpComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(HttpComponentConfiguration.class) +public class HttpComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(HttpComponent.class) + public HttpComponent configureComponent(CamelContext camelContext, + HttpComponentConfiguration configuration) throws Exception { + HttpComponent component = new HttpComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-http/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java b/components/camel-http/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java new file mode 100644 index 0000000..6e2d7f3 --- /dev/null +++ b/components/camel-http/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java @@ -0,0 +1,116 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.http.HttpClientConfigurer; +import org.apache.commons.httpclient.HttpConnectionManager; +import org.apache.camel.http.common.HttpBinding; +import org.apache.camel.http.common.HttpConfiguration; +import org.apache.camel.spi.HeaderFilterStrategy; + +/** + * For calling out to external HTTP servers using Apache HTTP Client 3.x. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.https") +public class HttpComponentConfiguration { + + /** + * To use the custom HttpClientConfigurer to perform configuration of the + * HttpClient that will be used. + */ + private HttpClientConfigurer httpClientConfigurer; + /** + * To use a custom HttpConnectionManager to manage connections + */ + private HttpConnectionManager httpConnectionManager; + /** + * To use a custom HttpBinding to control the mapping between Camel message + * and HttpClient. + */ + private HttpBinding httpBinding; + /** + * To use the shared HttpConfiguration as base configuration. + */ + private HttpConfiguration httpConfiguration; + /** + * Whether to allow java serialization when a request uses + * context-type=application/x-java-serialized-object This is by default + * turned off. If you enable this then be aware that Java will deserialize + * the incoming data from the request to Java and that can be a potential + * security risk. + */ + private boolean allowJavaSerializedObject; + /** + * To use a custom HeaderFilterStrategy to filter header to and from Camel + * message. + */ + private HeaderFilterStrategy headerFilterStrategy; + + public HttpClientConfigurer getHttpClientConfigurer() { + return httpClientConfigurer; + } + + public void setHttpClientConfigurer( + HttpClientConfigurer httpClientConfigurer) { + this.httpClientConfigurer = httpClientConfigurer; + } + + public HttpConnectionManager getHttpConnectionManager() { + return httpConnectionManager; + } + + public void setHttpConnectionManager( + HttpConnectionManager httpConnectionManager) { + this.httpConnectionManager = httpConnectionManager; + } + + public HttpBinding getHttpBinding() { + return httpBinding; + } + + public void setHttpBinding(HttpBinding httpBinding) { + this.httpBinding = httpBinding; + } + + public HttpConfiguration getHttpConfiguration() { + return httpConfiguration; + } + + public void setHttpConfiguration(HttpConfiguration httpConfiguration) { + this.httpConfiguration = httpConfiguration; + } + + public boolean isAllowJavaSerializedObject() { + return allowJavaSerializedObject; + } + + public void setAllowJavaSerializedObject(boolean allowJavaSerializedObject) { + this.allowJavaSerializedObject = allowJavaSerializedObject; + } + + public HeaderFilterStrategy getHeaderFilterStrategy() { + return headerFilterStrategy; + } + + public void setHeaderFilterStrategy( + HeaderFilterStrategy headerFilterStrategy) { + this.headerFilterStrategy = headerFilterStrategy; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-http/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-http/src/main/resources/META-INF/spring.factories b/components/camel-http/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..d248647 --- /dev/null +++ b/components/camel-http/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.http.springboot.HttpComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-http4/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-http4/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java b/components/camel-http4/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java new file mode 100644 index 0000000..edce926 --- /dev/null +++ b/components/camel-http4/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http4.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.http4.HttpComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(HttpComponentConfiguration.class) +public class HttpComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(HttpComponent.class) + public HttpComponent configureComponent(CamelContext camelContext, + HttpComponentConfiguration configuration) throws Exception { + HttpComponent component = new HttpComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-http4/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-http4/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java b/components/camel-http4/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java new file mode 100644 index 0000000..64bef4f --- /dev/null +++ b/components/camel-http4/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java @@ -0,0 +1,217 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http4.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.apache.camel.component.http4.HttpClientConfigurer; +import org.apache.http.conn.HttpClientConnectionManager; +import org.apache.camel.http.common.HttpBinding; +import org.apache.camel.http.common.HttpConfiguration; +import org.apache.http.protocol.HttpContext; +import org.apache.camel.util.jsse.SSLContextParameters; +import org.apache.http.conn.ssl.X509HostnameVerifier; +import org.apache.http.client.CookieStore; +import org.apache.camel.spi.HeaderFilterStrategy; + +/** + * For calling out to external HTTP servers using Apache HTTP Client 4.x. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.http4") +public class HttpComponentConfiguration { + + /** + * To use the custom HttpClientConfigurer to perform configuration of the + * HttpClient that will be used. + */ + private HttpClientConfigurer httpClientConfigurer; + /** + * To use a custom HttpClientConnectionManager to manage connections + */ + private HttpClientConnectionManager clientConnectionManager; + /** + * To use a custom HttpBinding to control the mapping between Camel message + * and HttpClient. + */ + private HttpBinding httpBinding; + /** + * To use the shared HttpConfiguration as base configuration. + */ + private HttpConfiguration httpConfiguration; + /** + * Whether to allow java serialization when a request uses + * context-type=application/x-java-serialized-object This is by default + * turned off. If you enable this then be aware that Java will deserialize + * the incoming data from the request to Java and that can be a potential + * security risk. + */ + private boolean allowJavaSerializedObject; + /** + * To use a custom org.apache.http.protocol.HttpContext when executing + * requests. + */ + private HttpContext httpContext; + /** + * To configure security using SSLContextParameters. Important: Only one + * instance of org.apache.camel.util.jsse.SSLContextParameters is supported + * per HttpComponent. If you need to use 2 or more different instances you + * need to define a new HttpComponent per instance you need. + */ + private SSLContextParameters sslContextParameters; + /** + * To use a custom X509HostnameVerifier such as + * org.apache.http.conn.ssl.StrictHostnameVerifier or + * org.apache.http.conn.ssl.AllowAllHostnameVerifier. + */ + private X509HostnameVerifier x509HostnameVerifier; + /** + * The maximum number of connections. + */ + private int maxTotalConnections; + /** + * The maximum number of connections per route. + */ + private int connectionsPerRoute; + /** + * The time for connection to live the time unit is millisecond the default + * value is always keep alive. + */ + private long connectionTimeToLive; + /** + * To use a custom org.apache.http.client.CookieStore. By default the + * org.apache.http.impl.client.BasicCookieStore is used which is an + * in-memory only cookie store. Notice if bridgeEndpoint=true then the + * cookie store is forced to be a noop cookie store as cookie shouldn't be + * stored as we are just bridging (eg acting as a proxy). + */ + private CookieStore cookieStore; + /** + * To use a custom HeaderFilterStrategy to filter header to and from Camel + * message. + */ + private HeaderFilterStrategy headerFilterStrategy; + + public HttpClientConfigurer getHttpClientConfigurer() { + return httpClientConfigurer; + } + + public void setHttpClientConfigurer( + HttpClientConfigurer httpClientConfigurer) { + this.httpClientConfigurer = httpClientConfigurer; + } + + public HttpClientConnectionManager getClientConnectionManager() { + return clientConnectionManager; + } + + public void setClientConnectionManager( + HttpClientConnectionManager clientConnectionManager) { + this.clientConnectionManager = clientConnectionManager; + } + + public HttpBinding getHttpBinding() { + return httpBinding; + } + + public void setHttpBinding(HttpBinding httpBinding) { + this.httpBinding = httpBinding; + } + + public HttpConfiguration getHttpConfiguration() { + return httpConfiguration; + } + + public void setHttpConfiguration(HttpConfiguration httpConfiguration) { + this.httpConfiguration = httpConfiguration; + } + + public boolean isAllowJavaSerializedObject() { + return allowJavaSerializedObject; + } + + public void setAllowJavaSerializedObject(boolean allowJavaSerializedObject) { + this.allowJavaSerializedObject = allowJavaSerializedObject; + } + + public HttpContext getHttpContext() { + return httpContext; + } + + public void setHttpContext(HttpContext httpContext) { + this.httpContext = httpContext; + } + + public SSLContextParameters getSslContextParameters() { + return sslContextParameters; + } + + public void setSslContextParameters( + SSLContextParameters sslContextParameters) { + this.sslContextParameters = sslContextParameters; + } + + public X509HostnameVerifier getX509HostnameVerifier() { + return x509HostnameVerifier; + } + + public void setX509HostnameVerifier( + X509HostnameVerifier x509HostnameVerifier) { + this.x509HostnameVerifier = x509HostnameVerifier; + } + + public int getMaxTotalConnections() { + return maxTotalConnections; + } + + public void setMaxTotalConnections(int maxTotalConnections) { + this.maxTotalConnections = maxTotalConnections; + } + + public int getConnectionsPerRoute() { + return connectionsPerRoute; + } + + public void setConnectionsPerRoute(int connectionsPerRoute) { + this.connectionsPerRoute = connectionsPerRoute; + } + + public long getConnectionTimeToLive() { + return connectionTimeToLive; + } + + public void setConnectionTimeToLive(long connectionTimeToLive) { + this.connectionTimeToLive = connectionTimeToLive; + } + + public CookieStore getCookieStore() { + return cookieStore; + } + + public void setCookieStore(CookieStore cookieStore) { + this.cookieStore = cookieStore; + } + + public HeaderFilterStrategy getHeaderFilterStrategy() { + return headerFilterStrategy; + } + + public void setHeaderFilterStrategy( + HeaderFilterStrategy headerFilterStrategy) { + this.headerFilterStrategy = headerFilterStrategy; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-http4/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-http4/src/main/resources/META-INF/spring.factories b/components/camel-http4/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..50597fc --- /dev/null +++ b/components/camel-http4/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.http4.springboot.HttpComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentAutoConfiguration.java b/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentAutoConfiguration.java new file mode 100644 index 0000000..c359070 --- /dev/null +++ b/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.ibatis.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.ibatis.IBatisComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(IBatisComponentConfiguration.class) +public class IBatisComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(IBatisComponent.class) + public IBatisComponent configureComponent(CamelContext camelContext, + IBatisComponentConfiguration configuration) throws Exception { + IBatisComponent component = new IBatisComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentConfiguration.java b/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentConfiguration.java new file mode 100644 index 0000000..d29f9d1 --- /dev/null +++ b/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentConfiguration.java @@ -0,0 +1,68 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.ibatis.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import com.ibatis.sqlmap.client.SqlMapClient; + +/** + * Performs a query poll insert update or delete in a relational database using + * Apache iBATIS. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.ibatis") +public class IBatisComponentConfiguration { + + /** + * To use the given com.ibatis.sqlmap.client.SqlMapClient + */ + private SqlMapClient sqlMapClient; + /** + * Location of iBatis xml configuration file. The default value is: + * SqlMapConfig.xml loaded from the classpath + */ + private String sqlMapConfig; + /** + * Whether to use transactions. This option is by default true. + */ + private boolean useTransactions; + + public SqlMapClient getSqlMapClient() { + return sqlMapClient; + } + + public void setSqlMapClient(SqlMapClient sqlMapClient) { + this.sqlMapClient = sqlMapClient; + } + + public String getSqlMapConfig() { + return sqlMapConfig; + } + + public void setSqlMapConfig(String sqlMapConfig) { + this.sqlMapConfig = sqlMapConfig; + } + + public boolean isUseTransactions() { + return useTransactions; + } + + public void setUseTransactions(boolean useTransactions) { + this.useTransactions = useTransactions; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-ibatis/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-ibatis/src/main/resources/META-INF/spring.factories b/components/camel-ibatis/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..d222b9c --- /dev/null +++ b/components/camel-ibatis/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.ibatis.springboot.IBatisComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/springboot/JcloudsComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/springboot/JcloudsComponentAutoConfiguration.java b/components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/springboot/JcloudsComponentAutoConfiguration.java new file mode 100644 index 0000000..ff38136 --- /dev/null +++ b/components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/springboot/JcloudsComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.jclouds.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.jclouds.JcloudsComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(JcloudsComponentConfiguration.class) +public class JcloudsComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(JcloudsComponent.class) + public JcloudsComponent configureComponent(CamelContext camelContext, + JcloudsComponentConfiguration configuration) throws Exception { + JcloudsComponent component = new JcloudsComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/springboot/JcloudsComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/springboot/JcloudsComponentConfiguration.java b/components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/springboot/JcloudsComponentConfiguration.java new file mode 100644 index 0000000..06a6d6e --- /dev/null +++ b/components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/springboot/JcloudsComponentConfiguration.java @@ -0,0 +1,57 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.jclouds.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import java.util.List; +import org.jclouds.blobstore.BlobStore; +import org.jclouds.compute.ComputeService; + +/** + * For interacting with cloud compute & blobstore service via jclouds. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.jclouds") +public class JcloudsComponentConfiguration { + + /** + * To use the given BlobStore which must be configured when using blobstore. + */ + private List<org.jclouds.blobstore.BlobStore> blobStores; + /** + * To use the given ComputeService which must be configured when use + * compute. + */ + private List<org.jclouds.compute.ComputeService> computeServices; + + public List<BlobStore> getBlobStores() { + return blobStores; + } + + public void setBlobStores(List<BlobStore> blobStores) { + this.blobStores = blobStores; + } + + public List<ComputeService> getComputeServices() { + return computeServices; + } + + public void setComputeServices(List<ComputeService> computeServices) { + this.computeServices = computeServices; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-jclouds/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-jclouds/src/main/resources/META-INF/spring.factories b/components/camel-jclouds/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..a73c82d --- /dev/null +++ b/components/camel-jclouds/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.jclouds.springboot.JcloudsComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java new file mode 100644 index 0000000..0050ed5 --- /dev/null +++ b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.jdbc.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.jdbc.JdbcComponent; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(JdbcComponentConfiguration.class) +public class JdbcComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(JdbcComponent.class) + public JdbcComponent configureComponent(CamelContext camelContext, + JdbcComponentConfiguration configuration) throws Exception { + JdbcComponent component = new JdbcComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentConfiguration.java b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentConfiguration.java new file mode 100644 index 0000000..e570185 --- /dev/null +++ b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentConfiguration.java @@ -0,0 +1,44 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.jdbc.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import javax.sql.DataSource; + +/** + * The jdbc component enables you to access databases through JDBC where SQL + * queries are sent in the message body. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.jdbc") +public class JdbcComponentConfiguration { + + /** + * To use the DataSource instance instead of looking up the data source by + * name from the registry. + */ + private DataSource dataSource; + + public DataSource getDataSource() { + return dataSource; + } + + public void setDataSource(DataSource dataSource) { + this.dataSource = dataSource; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-jdbc/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-jdbc/src/main/resources/META-INF/spring.factories b/components/camel-jdbc/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..b9900b5 --- /dev/null +++ b/components/camel-jdbc/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# 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. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.jdbc.springboot.JdbcComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/3ad3f004/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java ---------------------------------------------------------------------- diff --git a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java new file mode 100644 index 0000000..b42a90c --- /dev/null +++ b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.jetty9.springboot; + +import org.springframework.context.annotation.Configuration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.component.jetty9.JettyHttpComponent9; +import org.apache.camel.CamelContext; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.context.annotation.Bean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(JettyHttpComponentConfiguration9.class) +public class JettyHttpComponentAutoConfiguration9 { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(JettyHttpComponent9.class) + public JettyHttpComponent9 configureComponent(CamelContext camelContext, + JettyHttpComponentConfiguration9 configuration) throws Exception { + JettyHttpComponent9 component = new JettyHttpComponent9(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file