From e337851962a0ef2155b17bd6789f4eac9583d917 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 11 Jun 2021 14:39:38 +0200 Subject: [PATCH] WIP --- transfer/pom.xml | 4 ++++ .../java/de/juplo/kafka/payment/transfer/TransferService.java | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/transfer/pom.xml b/transfer/pom.xml index a565231..f1305cf 100644 --- a/transfer/pom.xml +++ b/transfer/pom.xml @@ -49,6 +49,10 @@ kafka-streams-avro-serde ${confluent.version} + + jakarta.validation + jakarta.validation-api + org.projectlombok lombok diff --git a/transfer/src/main/java/de/juplo/kafka/payment/transfer/TransferService.java b/transfer/src/main/java/de/juplo/kafka/payment/transfer/TransferService.java index a99634e..15550af 100644 --- a/transfer/src/main/java/de/juplo/kafka/payment/transfer/TransferService.java +++ b/transfer/src/main/java/de/juplo/kafka/payment/transfer/TransferService.java @@ -17,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.context.request.async.DeferredResult; +import javax.validation.Valid; + @RestController public class TransferService @@ -42,7 +44,7 @@ public class TransferService path = "/orders", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.TEXT_PLAIN_VALUE) - public DeferredResult> placeOrder(@Valid @RequestBody OrderBean order) + public DeferredResult> placeOrder(@Valid @RequestBody Transfer order) { DeferredResult> result = new DeferredResult<>(); -- 2.20.1