import java.util.concurrent.CompletableFuture;
-@RestController
+@RequestMapping(TransferController.PATH)
+@ResponseBody
@RequiredArgsConstructor
@Slf4j
public class TransferController
@PostMapping(
- path = PATH,
+ path = "",
consumes = MediaType.APPLICATION_JSON_VALUE,
produces = MediaType.APPLICATION_JSON_VALUE)
public DeferredResult<ResponseEntity<?>> transfer(
.payer(transferDTO.getPayer())
.payee(transferDTO.getPayee())
.amount(transferDTO.getAmount())
- .state(Transfer.State.RECEIVED)
.build())
.thenApply($ ->
ResponseEntity
}
@GetMapping(
- path = PATH + "/{id}",
+ path = "/{id}",
produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<TransferDTO> get(@PathVariable Long id)
{