diff --git a/spring-cloud-stream-binder-rabbit-deployer/.jdk8 b/spring-cloud-stream-binder-rabbit-deployer/.jdk8 new file mode 100644 index 000000000..e69de29bb diff --git a/spring-cloud-stream-binder-rabbit-deployer/pom.xml b/spring-cloud-stream-binder-rabbit-deployer/pom.xml new file mode 100644 index 000000000..954dd7d2a --- /dev/null +++ b/spring-cloud-stream-binder-rabbit-deployer/pom.xml @@ -0,0 +1,41 @@ + + + 4.0.0 + + spring-cloud-stream-binder-rabbit-deployer + jar + spring-cloud-stream-binder-rabbit-deployer + RabbitMQ binder application deployer + + + org.springframework.cloud + spring-cloud-stream-binder-rabbit-parent + 3.1.2-SNAPSHOT + + + + + org.springframework.cloud + spring-cloud-stream-binder-rabbit + + + + org.springframework.cloud + spring-cloud-function-deployer + ${project.version} + + + org.springframework.boot + spring-boot-configuration-processor + true + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + diff --git a/spring-cloud-stream-binder-rabbit-deployer/src/main/java/org/springframework/cloud/stream/binder/rabbit/deployer/RabbitDeployer.java b/spring-cloud-stream-binder-rabbit-deployer/src/main/java/org/springframework/cloud/stream/binder/rabbit/deployer/RabbitDeployer.java new file mode 100644 index 000000000..75d2eeda2 --- /dev/null +++ b/spring-cloud-stream-binder-rabbit-deployer/src/main/java/org/springframework/cloud/stream/binder/rabbit/deployer/RabbitDeployer.java @@ -0,0 +1,50 @@ +/* + * Copyright 2021-2021 the original author or authors. + * + * Licensed 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 + * + * https://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.springframework.cloud.stream.binder.rabbit.deployer; + +import java.util.function.Function; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; + + +/** + * + * @author Oleg Zhurakousky + * @since 3.1.2 + * + */ +@SpringBootApplication +public class RabbitDeployer { + + public static void main(String[] args) { + SpringApplication.run(RabbitDeployer.class, + + //target/it/bootjar/target/bootjar-1.0.0.RELEASE-exec.jar + "--spring.cloud.function.definition=reverseFunction;echo", + "--spring.cloud.function.location=/Users/ozhurakousky/dev/repo/spring-cloud-function/spring-cloud-function-deployer/target/it/bootjar/target/bootjar-1.0.0.RELEASE-exec.jar", + "--spring.cloud.function.function-class=function.example.ReverseFunction"); + } + + + @Bean + public Function echo() { + return v -> v; + } + +} diff --git a/spring-cloud-stream-binder-rabbit-deployer/src/main/resources/META-INF/spring.binders b/spring-cloud-stream-binder-rabbit-deployer/src/main/resources/META-INF/spring.binders new file mode 100644 index 000000000..7a65c4682 --- /dev/null +++ b/spring-cloud-stream-binder-rabbit-deployer/src/main/resources/META-INF/spring.binders @@ -0,0 +1,2 @@ +rabbit:\ +org.springframework.cloud.stream.binder.rabbit.config.RabbitServiceAutoConfiguration diff --git a/spring-cloud-stream-binder-rabbit-deployer/src/main/resources/META-INF/spring.factories b/spring-cloud-stream-binder-rabbit-deployer/src/main/resources/META-INF/spring.factories new file mode 100644 index 000000000..c299f8ddf --- /dev/null +++ b/spring-cloud-stream-binder-rabbit-deployer/src/main/resources/META-INF/spring.factories @@ -0,0 +1 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=org.springframework.cloud.stream.binder.rabbit.config.ExtendedBindingHandlerMappingsProviderConfiguration diff --git a/spring-cloud-stream-binder-rabbit-deployer/src/test/resources/log4j.properties b/spring-cloud-stream-binder-rabbit-deployer/src/test/resources/log4j.properties new file mode 100644 index 000000000..335956bc0 --- /dev/null +++ b/spring-cloud-stream-binder-rabbit-deployer/src/test/resources/log4j.properties @@ -0,0 +1,8 @@ +log4j.rootCategory=DEBUG, stdout + +# standard logging including calling site +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %40.40c:%4L - %m%n + +log4j.category.org.springframework.cloud.binder.rabbit=DEBUG