Skip to content

Commit

Permalink
feat: test method
Browse files Browse the repository at this point in the history
  • Loading branch information
redcarrot1 committed Dec 26, 2023
1 parent c068ed2 commit 903e0f7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/solution/gdsc/PathPal/MainController.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ public String index() {
return "hello world!";
}

@GetMapping
@GetMapping("/test")
public String test(@RequestBody Dto dto) {
return "받은 데이터 = " + dto.getName();
if (dto.getName() == null) {
return "받은 데이터가 없습니다.";
}
else {
return "받은 데이터 = " + dto.getName();
}
}
}

0 comments on commit 903e0f7

Please sign in to comment.