 1 package buckpal.adapter.in.web;
 2
 3 @RestController
 4 @RequiredArgsConstructor
 5 class AccountController {
 6
 7   private final GetAccountBalanceUseCase getAccountBalanceUseCase;
 8   private final ListAccountsQuery listAccountsQuery;
 9   private final LoadAccountQuery loadAccountQuery;
10
11   private final SendMoneyUseCase sendMoneyUseCase;
12   private final CreateAccountUseCase createAccountUseCase;
13
14   @GetMapping("/accounts")
15   List<AccountResource> listAccounts(){
16     ...
17   }
18
19   @GetMapping("/accounts/{id}")
20   AccountResource getAccount(@PathVariable("id") Long accountId){
21     ...
22   }
23
24   @GetMapping("/accounts/{id}/balance")
25   long getAccountBalance(@PathVariable("id") Long accountId){
26     ...
27   }
28
29   @PostMapping("/accounts")
30   AccountResource createAccount(@RequestBody AccountResource account) {
31     ...
32   }
33
34   @PostMapping("/accounts/send/{sourceAccountId}/{targetAccountId}/{amount}")
35   void sendMoney(
36       @PathVariable("sourceAccountId") Long sourceAccountId,
37       @PathVariable("targetAccountId") Long targetAccountId,
38       @PathVariable("amount") Long amount) {
39     ...
40   }
41 }
