From 515b84b2fe7823ad752d2a9c895076452d8780ca Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Mon, 30 Jan 2017 02:44:19 +0100 Subject: [PATCH] Using my own Schema Registry Server See: http://docs.spring.io/spring-cloud-stream/docs/current/reference/html/contenttypemanagement.html#_schema_registry_server --- .../spring-cloud-stream-kafka-example-bom/pom.xml | 14 ++++++ .../pom.xml | 58 ++++++++++++++++++++++ .../java/de/example/spring/kafka/Application.java | 17 +++++++ .../src/main/resources/application.yml | 14 ++++++ 4 files changed, 103 insertions(+) create mode 100644 SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-registry-example/pom.xml create mode 100644 SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-registry-example/src/main/java/de/example/spring/kafka/Application.java create mode 100644 SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-registry-example/src/main/resources/application.yml diff --git a/SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-example-bom/pom.xml b/SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-example-bom/pom.xml index 97de5df..3d5df09 100644 --- a/SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-example-bom/pom.xml +++ b/SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-example-bom/pom.xml @@ -87,6 +87,20 @@ test + + + + + + + org.springframework.cloud + spring-cloud-stream-server + + + + diff --git a/SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-registry-example/pom.xml b/SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-registry-example/pom.xml new file mode 100644 index 0000000..e530f21 --- /dev/null +++ b/SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-registry-example/pom.xml @@ -0,0 +1,58 @@ + + + + 4.0.0 + + + de.example.spring.kafka + spring-cloud-stream-kafka-example-bom + 1.0-SNAPSHOT + + + spring-cloud-stream-kafka-registry-example + spring-cloud-stream-kafka-registry-example + https://gumartinm.name + Spring Cloud Stream Kafka Registry + + gumartinm + https://gumartinm.name + + + scm:git:https://git.gumartinm.name/JavaForFun + https://git.gumartinm.name/JavaForFun + + + + + + javax.inject + javax.inject + 1 + + + + de.example.spring.kafka + spring-cloud-stream-kafka-common-example + 1.0-SNAPSHOT + + + + + org.springframework.cloud + spring-cloud-stream-server + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-registry-example/src/main/java/de/example/spring/kafka/Application.java b/SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-registry-example/src/main/java/de/example/spring/kafka/Application.java new file mode 100644 index 0000000..9817e62 --- /dev/null +++ b/SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-registry-example/src/main/java/de/example/spring/kafka/Application.java @@ -0,0 +1,17 @@ +package de.example.spring.kafka; + +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.cloud.stream.schema.server.EnableSchemaRegistryServer; + +@SpringBootApplication +@EnableSchemaRegistryServer +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class); + } + +} diff --git a/SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-registry-example/src/main/resources/application.yml b/SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-registry-example/src/main/resources/application.yml new file mode 100644 index 0000000..bebb6c8 --- /dev/null +++ b/SpringJava/Kafka/SpringCloudStream/spring-cloud-stream-kafka-registry-example/src/main/resources/application.yml @@ -0,0 +1,14 @@ +logging: + level: + org: + springframework: info + ROOT: info + +server: + port: 8888 +spring: + cloud: + stream: + schema: + server: + path: schema -- 2.1.4