WIP
authorKai Moritz <kai@juplo.de>
Fri, 11 Jun 2021 12:39:38 +0000 (14:39 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 11 Jun 2021 12:39:38 +0000 (14:39 +0200)
transfer/pom.xml
transfer/src/main/java/de/juplo/kafka/payment/transfer/TransferService.java

index a565231..f1305cf 100644 (file)
                        <artifactId>kafka-streams-avro-serde</artifactId>
                        <version>${confluent.version}</version>
                </dependency>
+               <dependency>
+                       <groupId>jakarta.validation</groupId>
+                       <artifactId>jakarta.validation-api</artifactId>
+               </dependency>
                <dependency>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
index a99634e..15550af 100644 (file)
@@ -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<ResponseEntity<?>> placeOrder(@Valid @RequestBody OrderBean order)
+  public DeferredResult<ResponseEntity<?>> placeOrder(@Valid @RequestBody Transfer order)
   {
     DeferredResult<ResponseEntity<?>> result = new DeferredResult<>();