From: Kai Moritz Date: Fri, 11 Jun 2021 11:31:57 +0000 (+0200) Subject: WIP X-Git-Tag: wip-initialer-commit~24 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=9b619f0675be75da7b7d0d50db7a028ff751c315;p=demos%2Fkafka%2Fdemos-kafka-payment-system-transfer WIP --- diff --git a/transfer/pom.xml b/transfer/pom.xml index d43eb92..e6423c5 100644 --- a/transfer/pom.xml +++ b/transfer/pom.xml @@ -1,93 +1,105 @@ - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.5.1 - - - de.juplo.kafka.payment - transfer - 1.0-SNAPSHOT - Transfer Service - An MVP for the Transfer Service - - 11 - 1.10.2 - 6.2.0 - 2.8.0 - - - - org.springframework.boot - spring-boot-starter-actuator - - - org.springframework.boot - spring-boot-starter-web - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.5.1 + + + de.juplo.kafka.payment + transfer + 1.0-SNAPSHOT + Transfer Service + An MVP for the Transfer Service + + 11 + 1.10.2 + 6.2.0 + 2.8.0 + + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-web + - - org.apache.kafka - kafka-client - - - org.springframework.boot - spring-boot-devtools - runtime - true - - - org.apache.avro - avro - ${avro.version} - - - org.projectlombok - lombok - true - - - org.springframework.boot - spring-boot-starter-test - test - - + + org.apache.kafka + kafka-clients + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + org.apache.avro + avro + ${avro.version} + + + io.confluent + kafka-streams-avro-serde + ${confluent.version} + + + org.projectlombok + lombok + true + + + org.springframework.boot + spring-boot-starter-test + test + + - - - - org.springframework.boot - spring-boot-maven-plugin - - - - org.projectlombok - lombok - - - - - - org.apache.avro - avro-maven-plugin - ${avro.version} - - - generate-sources - - schema - - - ${project.basedir}/ - ${project.basedir}/src/main/java/ - - - - - - + + + confluent + https://packages.confluent.io/maven/ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + org.projectlombok + lombok + + + + + + org.apache.avro + avro-maven-plugin + ${avro.version} + + + generate-sources + + schema + + + ${project.basedir}/ + ${project.basedir}/src/main/java/ + + + + + + diff --git a/transfer/src/main/java/de/juplo/kafka/payment/transfer/TransferServiceApplication.java b/transfer/src/main/java/de/juplo/kafka/payment/transfer/TransferServiceApplication.java index 4a55c85..1bfaaa1 100644 --- a/transfer/src/main/java/de/juplo/kafka/payment/transfer/TransferServiceApplication.java +++ b/transfer/src/main/java/de/juplo/kafka/payment/transfer/TransferServiceApplication.java @@ -2,13 +2,13 @@ package de.juplo.kafka.payment.transfer; import de.trion.microservices.avro.Order; -import io.confluent.kafka.streams.serdes.avro.SpecificAvroSerializer; import java.util.Properties; import java.util.UUID; + +import io.confluent.kafka.streams.serdes.avro.SpecificAvroSerializer; +import lombok.extern.slf4j.Slf4j; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.common.serialization.UUIDSerializer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.properties.EnableConfigurationProperties; @@ -17,11 +17,9 @@ import org.springframework.context.annotation.Bean; @SpringBootApplication @EnableConfigurationProperties(TransferServiceProperties.class) +@Slf4j public class TransferServiceApplication { - private final static Logger LOG = LoggerFactory.getLogger(TransferServiceApplication.class); - - @Bean(destroyMethod = "close") KafkaProducer producer(TransferServiceProperties properties) {