diff --git a/src/main/java/com/avengers/example/controller/AccountController.java b/src/main/java/com/avengers/example/controller/AccountController.java index 61aebe0..a4a2a24 100644 --- a/src/main/java/com/avengers/example/controller/AccountController.java +++ b/src/main/java/com/avengers/example/controller/AccountController.java @@ -16,7 +16,6 @@ public class AccountController { private final AccountService accountService; - // TODO: Resolve compilation issue here @PostMapping("/account") public ResponseEntity save(@RequestBody Account account) { diff --git a/src/main/java/com/avengers/example/service/AccountService.java b/src/main/java/com/avengers/example/service/AccountService.java index 09d2f00..b316c17 100644 --- a/src/main/java/com/avengers/example/service/AccountService.java +++ b/src/main/java/com/avengers/example/service/AccountService.java @@ -15,9 +15,9 @@ public class AccountService private final AccountRepository accountRepository; @Transactional - public void create(Account account) + public Account create(Account account) { - accountRepository.save(account); + return accountRepository.save(account); } public List findAll()