From 4aaa488ffc98a3bdb1b92e3a6f047c9819df9ee1 Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Fri, 2 Mar 2018 14:26:46 -0500 Subject: [PATCH] samples cleanup --- {sink => jdbc-sink}/.mvn | 0 sink/README.md => jdbc-sink/README.adoc | 0 {sink => jdbc-sink}/docker-compose.yml | 0 {sink => jdbc-sink}/mvnw | 0 {sink => jdbc-sink}/mvnw.cmd | 0 {sink => jdbc-sink}/pom.xml | 2 +- .../src/main/java/demo/SampleJdbcSink.java | 0 .../src/main/resources/application.yml | 0 .../src/main/resources/sample-schema.sql | 0 .../java/demo/ModuleApplicationTests.java | 0 .../src/test/resources/application.properties | 0 {sink => jdbc-sink}/start-kafka-shell.sh | 0 {source => jdbc-source}/.mvn | 0 {source => jdbc-source}/README.adoc | 0 {source => jdbc-source}/docker-compose.yml | 0 {source => jdbc-source}/mvnw | 0 {source => jdbc-source}/mvnw.cmd | 0 {source => jdbc-source}/pom.xml | 2 +- .../main/java/demo/JdbcSourceProperties.java | 0 .../src/main/java/demo/SampleJdbcSource.java | 0 .../src/main/resources/application.yml | 0 .../src/main/resources/sample-schema.sql | 0 .../java/demo/ModuleApplicationTests.java | 0 .../src/test/resources/application.properties | 0 {source => jdbc-source}/start-kafka-shell.sh | 0 multibinder-differentsystems/pom.xml | 96 +++++++++++-------- .../TwoKafkaBindersApplicationTest.java | 9 +- pom.xml | 6 +- 28 files changed, 63 insertions(+), 52 deletions(-) rename {sink => jdbc-sink}/.mvn (100%) rename sink/README.md => jdbc-sink/README.adoc (100%) rename {sink => jdbc-sink}/docker-compose.yml (100%) rename {sink => jdbc-sink}/mvnw (100%) rename {sink => jdbc-sink}/mvnw.cmd (100%) rename {sink => jdbc-sink}/pom.xml (98%) rename {sink => jdbc-sink}/src/main/java/demo/SampleJdbcSink.java (100%) rename {sink => jdbc-sink}/src/main/resources/application.yml (100%) rename {sink => jdbc-sink}/src/main/resources/sample-schema.sql (100%) rename {sink => jdbc-sink}/src/test/java/demo/ModuleApplicationTests.java (100%) rename {sink => jdbc-sink}/src/test/resources/application.properties (100%) rename {sink => jdbc-sink}/start-kafka-shell.sh (100%) rename {source => jdbc-source}/.mvn (100%) rename {source => jdbc-source}/README.adoc (100%) rename {source => jdbc-source}/docker-compose.yml (100%) rename {source => jdbc-source}/mvnw (100%) rename {source => jdbc-source}/mvnw.cmd (100%) rename {source => jdbc-source}/pom.xml (95%) rename {source => jdbc-source}/src/main/java/demo/JdbcSourceProperties.java (100%) rename {source => jdbc-source}/src/main/java/demo/SampleJdbcSource.java (100%) rename {source => jdbc-source}/src/main/resources/application.yml (100%) rename {source => jdbc-source}/src/main/resources/sample-schema.sql (100%) rename {source => jdbc-source}/src/test/java/demo/ModuleApplicationTests.java (100%) rename {source => jdbc-source}/src/test/resources/application.properties (100%) rename {source => jdbc-source}/start-kafka-shell.sh (100%) diff --git a/sink/.mvn b/jdbc-sink/.mvn similarity index 100% rename from sink/.mvn rename to jdbc-sink/.mvn diff --git a/sink/README.md b/jdbc-sink/README.adoc similarity index 100% rename from sink/README.md rename to jdbc-sink/README.adoc diff --git a/sink/docker-compose.yml b/jdbc-sink/docker-compose.yml similarity index 100% rename from sink/docker-compose.yml rename to jdbc-sink/docker-compose.yml diff --git a/sink/mvnw b/jdbc-sink/mvnw similarity index 100% rename from sink/mvnw rename to jdbc-sink/mvnw diff --git a/sink/mvnw.cmd b/jdbc-sink/mvnw.cmd similarity index 100% rename from sink/mvnw.cmd rename to jdbc-sink/mvnw.cmd diff --git a/sink/pom.xml b/jdbc-sink/pom.xml similarity index 98% rename from sink/pom.xml rename to jdbc-sink/pom.xml index b45b2a0..369779a 100644 --- a/sink/pom.xml +++ b/jdbc-sink/pom.xml @@ -4,7 +4,7 @@ 4.0.0 spring.cloud.stream.samples - sample-jdbc-sink + jdbc-sink 0.0.1-SNAPSHOT jar diff --git a/sink/src/main/java/demo/SampleJdbcSink.java b/jdbc-sink/src/main/java/demo/SampleJdbcSink.java similarity index 100% rename from sink/src/main/java/demo/SampleJdbcSink.java rename to jdbc-sink/src/main/java/demo/SampleJdbcSink.java diff --git a/sink/src/main/resources/application.yml b/jdbc-sink/src/main/resources/application.yml similarity index 100% rename from sink/src/main/resources/application.yml rename to jdbc-sink/src/main/resources/application.yml diff --git a/sink/src/main/resources/sample-schema.sql b/jdbc-sink/src/main/resources/sample-schema.sql similarity index 100% rename from sink/src/main/resources/sample-schema.sql rename to jdbc-sink/src/main/resources/sample-schema.sql diff --git a/sink/src/test/java/demo/ModuleApplicationTests.java b/jdbc-sink/src/test/java/demo/ModuleApplicationTests.java similarity index 100% rename from sink/src/test/java/demo/ModuleApplicationTests.java rename to jdbc-sink/src/test/java/demo/ModuleApplicationTests.java diff --git a/sink/src/test/resources/application.properties b/jdbc-sink/src/test/resources/application.properties similarity index 100% rename from sink/src/test/resources/application.properties rename to jdbc-sink/src/test/resources/application.properties diff --git a/sink/start-kafka-shell.sh b/jdbc-sink/start-kafka-shell.sh similarity index 100% rename from sink/start-kafka-shell.sh rename to jdbc-sink/start-kafka-shell.sh diff --git a/source/.mvn b/jdbc-source/.mvn similarity index 100% rename from source/.mvn rename to jdbc-source/.mvn diff --git a/source/README.adoc b/jdbc-source/README.adoc similarity index 100% rename from source/README.adoc rename to jdbc-source/README.adoc diff --git a/source/docker-compose.yml b/jdbc-source/docker-compose.yml similarity index 100% rename from source/docker-compose.yml rename to jdbc-source/docker-compose.yml diff --git a/source/mvnw b/jdbc-source/mvnw similarity index 100% rename from source/mvnw rename to jdbc-source/mvnw diff --git a/source/mvnw.cmd b/jdbc-source/mvnw.cmd similarity index 100% rename from source/mvnw.cmd rename to jdbc-source/mvnw.cmd diff --git a/source/pom.xml b/jdbc-source/pom.xml similarity index 95% rename from source/pom.xml rename to jdbc-source/pom.xml index c09a47e..f9440df 100644 --- a/source/pom.xml +++ b/jdbc-source/pom.xml @@ -4,7 +4,7 @@ 4.0.0 spring.cloud.stream.samples - sample-jdbc-source + jdbc-source 0.0.1-SNAPSHOT jar diff --git a/source/src/main/java/demo/JdbcSourceProperties.java b/jdbc-source/src/main/java/demo/JdbcSourceProperties.java similarity index 100% rename from source/src/main/java/demo/JdbcSourceProperties.java rename to jdbc-source/src/main/java/demo/JdbcSourceProperties.java diff --git a/source/src/main/java/demo/SampleJdbcSource.java b/jdbc-source/src/main/java/demo/SampleJdbcSource.java similarity index 100% rename from source/src/main/java/demo/SampleJdbcSource.java rename to jdbc-source/src/main/java/demo/SampleJdbcSource.java diff --git a/source/src/main/resources/application.yml b/jdbc-source/src/main/resources/application.yml similarity index 100% rename from source/src/main/resources/application.yml rename to jdbc-source/src/main/resources/application.yml diff --git a/source/src/main/resources/sample-schema.sql b/jdbc-source/src/main/resources/sample-schema.sql similarity index 100% rename from source/src/main/resources/sample-schema.sql rename to jdbc-source/src/main/resources/sample-schema.sql diff --git a/source/src/test/java/demo/ModuleApplicationTests.java b/jdbc-source/src/test/java/demo/ModuleApplicationTests.java similarity index 100% rename from source/src/test/java/demo/ModuleApplicationTests.java rename to jdbc-source/src/test/java/demo/ModuleApplicationTests.java diff --git a/source/src/test/resources/application.properties b/jdbc-source/src/test/resources/application.properties similarity index 100% rename from source/src/test/resources/application.properties rename to jdbc-source/src/test/resources/application.properties diff --git a/source/start-kafka-shell.sh b/jdbc-source/start-kafka-shell.sh similarity index 100% rename from source/start-kafka-shell.sh rename to jdbc-source/start-kafka-shell.sh diff --git a/multibinder-differentsystems/pom.xml b/multibinder-differentsystems/pom.xml index 5562ff1..16f668d 100644 --- a/multibinder-differentsystems/pom.xml +++ b/multibinder-differentsystems/pom.xml @@ -2,62 +2,42 @@ 4.0.0 - spring-cloud-stream-sample-multibinder-differentsystems + spring.cloud.stream.samples + multibinder-differentsystems + 0.0.1-SNAPSHOT jar - spring-cloud-stream-sample-multibinder-differentsystems - - Demo project for multiple binders of the same type (Kafka), connecting to different systems (broker groups) - + + multibinder-differentsystems + Demo project for Spring Boot - org.springframework.cloud - spring-cloud-stream-samples - 1.2.0.BUILD-SNAPSHOT + org.springframework.boot + spring-boot-starter-parent + 2.0.0.RELEASE + - multibinder.MultibinderApplication + UTF-8 + UTF-8 + 1.8 + Finchley.BUILD-SNAPSHOT + - org.springframework.cloud - spring-cloud-stream + org.springframework.boot + spring-boot-starter-actuator - org.springframework.cloud - spring-cloud-stream-sample-source - - - org.springframework.cloud - spring-cloud-stream-sample-transform - - - org.springframework.cloud - spring-cloud-stream-sample-sink + org.springframework.boot + spring-boot-starter org.springframework.cloud spring-cloud-stream-binder-kafka - - org.apache.curator - curator-test - 2.6.0 - test - - - org.slf4j - slf4j-log4j12 - - - - - org.springframework.boot - spring-boot-configuration-processor - true - - org.springframework.boot spring-boot-starter-test @@ -66,19 +46,51 @@ org.springframework.kafka spring-kafka-test + test + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + org.springframework.boot spring-boot-maven-plugin - - exec - + + + spring-snapshots + Spring Snapshots + http://repo.spring.io/libs-snapshot-local + + true + + + false + + + + spring-milestones + Spring Milestones + http://repo.spring.io/libs-milestone-local + + false + + + + diff --git a/multibinder-differentsystems/src/test/java/multibinder/TwoKafkaBindersApplicationTest.java b/multibinder-differentsystems/src/test/java/multibinder/TwoKafkaBindersApplicationTest.java index 64c97d2..a8e0e4d 100644 --- a/multibinder-differentsystems/src/test/java/multibinder/TwoKafkaBindersApplicationTest.java +++ b/multibinder-differentsystems/src/test/java/multibinder/TwoKafkaBindersApplicationTest.java @@ -38,17 +38,16 @@ import org.springframework.messaging.Message; import org.springframework.messaging.MessageChannel; import org.springframework.messaging.support.MessageBuilder; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.web.WebAppConfiguration; +import org.springframework.test.context.junit4.SpringRunner; import java.util.UUID; import static org.hamcrest.Matchers.arrayWithSize; import static org.hamcrest.Matchers.equalTo; -@RunWith(SpringJUnit4ClassRunner.class) -@SpringBootTest(classes = MultibinderApplication.class) -@WebAppConfiguration +@RunWith(SpringRunner.class) +@SpringBootTest( + webEnvironment = SpringBootTest.WebEnvironment.NONE) @DirtiesContext @Ignore public class TwoKafkaBindersApplicationTest { diff --git a/pom.xml b/pom.xml index 3e215a4..31e272d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,14 +21,14 @@ 1.8 - source - sink + jdbc-sink + jdbc-source dynamic-source transform double non-self-contained-aggregate-app - + multibinder-differentsystems multi-io stream-listener reactive-processor-kafka