From: Kai Moritz Date: Fri, 11 Jun 2021 12:39:38 +0000 (+0200) Subject: WIP X-Git-Tag: wip-initialer-commit~19 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=e337851962a0ef2155b17bd6789f4eac9583d917;p=demos%2Fkafka%2Fdemos-kafka-payment-system-setup WIP --- 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<>();