From 2bc0715a49ea1a87e1e118171e350fa7460005b5 Mon Sep 17 00:00:00 2001 From: Artur Ciocanu Date: Thu, 27 Jun 2024 22:30:10 +0300 Subject: [PATCH] Adding path variable names to avoid Spring Boot 3.x issues Signed-off-by: Artur Ciocanu --- .../dapr/it/methodinvoke/http/MethodInvokeController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk-tests/src/test/java/io/dapr/it/methodinvoke/http/MethodInvokeController.java b/sdk-tests/src/test/java/io/dapr/it/methodinvoke/http/MethodInvokeController.java index f75b00984..8ff77985b 100644 --- a/sdk-tests/src/test/java/io/dapr/it/methodinvoke/http/MethodInvokeController.java +++ b/sdk-tests/src/test/java/io/dapr/it/methodinvoke/http/MethodInvokeController.java @@ -33,12 +33,12 @@ public void postMessages(@RequestBody String message){ } @PutMapping(path = "/messages/{messageId}") - public void putMessages(@PathVariable Integer messageId, @RequestBody String message){ + public void putMessages(@PathVariable("messageId") Integer messageId, @RequestBody String message){ messagesReceived.put(messageId,message); } @DeleteMapping(path = "/messages/{messageId}") - public void deleteMessages(@PathVariable Integer messageId){ + public void deleteMessages(@PathVariable("messageId") Integer messageId){ messagesReceived.remove(messageId); } @@ -58,7 +58,7 @@ public void postPerson(@RequestBody Person person){ } @PutMapping(path = "/persons/{personId}") - public void putPerson(@PathVariable Integer personId, @RequestBody Person person){ + public void putPerson(@PathVariable("personId") Integer personId, @RequestBody Person person){ final Optional auxPerson = persons.stream().filter(person1 -> person1.getId() == personId).findFirst(); if(auxPerson.isPresent()){ auxPerson.get().setName(person.getName()); @@ -68,7 +68,7 @@ public void putPerson(@PathVariable Integer personId, @RequestBody Person person } @DeleteMapping(path = "/persons/{personId}") - public void deletePerson(@PathVariable Integer personId){ + public void deletePerson(@PathVariable("personId") Integer personId){ final Optional auxPerson = persons.stream().filter(person1 -> person1.getId() == personId).findFirst(); if(auxPerson.isPresent()) { persons.remove(auxPerson.get());