Add SB files. This fixes #1078
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0b46b082 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0b46b082 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0b46b082 Branch: refs/heads/master Commit: 0b46b082049738055bf46491564f66b9590dd11c Parents: e60279c Author: Claus Ibsen <davscl...@apache.org> Authored: Fri Jul 15 17:05:47 2016 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Fri Jul 15 17:05:47 2016 +0200 ---------------------------------------------------------------------- .../LumberjackComponentAutoConfiguration.java | 52 ++++++++++++++++++++ .../LumberjackComponentConfiguration.java | 44 +++++++++++++++++ .../main/resources/META-INF/spring.factories | 19 +++++++ 3 files changed, 115 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/0b46b082/components/camel-lumberjack/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-lumberjack/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java b/components/camel-lumberjack/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java new file mode 100644 index 0000000..56c0466 --- /dev/null +++ b/components/camel-lumberjack/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentAutoConfiguration.java @@ -0,0 +1,52 @@ +/** + * 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.lumberjack.springboot; + +import java.util.HashMap; +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.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(LumberjackComponentConfiguration.class) +public class LumberjackComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(LumberjackComponent.class) + public LumberjackComponent configureLumberjackComponent( + CamelContext camelContext, + LumberjackComponentConfiguration configuration) throws Exception { + LumberjackComponent component = new LumberjackComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null, + false); + 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/0b46b082/components/camel-lumberjack/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-lumberjack/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentConfiguration.java b/components/camel-lumberjack/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentConfiguration.java new file mode 100644 index 0000000..e3dc61d --- /dev/null +++ b/components/camel-lumberjack/src/main/java/org/apache/camel/component/lumberjack/springboot/LumberjackComponentConfiguration.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.lumberjack.springboot; + +import org.apache.camel.util.jsse.SSLContextParameters; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Camel Lumberjack log streaming component + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.lumberjack") +public class LumberjackComponentConfiguration { + + /** + * Sets the default SSL configuration to use for all the endpoints. You can + * also configure it directly at the endpoint level. + */ + private SSLContextParameters sslContextParameters; + + public SSLContextParameters getSslContextParameters() { + return sslContextParameters; + } + + public void setSslContextParameters( + SSLContextParameters sslContextParameters) { + this.sslContextParameters = sslContextParameters; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/0b46b082/components/camel-lumberjack/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-lumberjack/src/main/resources/META-INF/spring.factories b/components/camel-lumberjack/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..e006396 --- /dev/null +++ b/components/camel-lumberjack/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.lumberjack.springboot.LumberjackComponentAutoConfiguration