Spring Boot/Spring Batch 목표 아키텍처 정의 (BAIS-SPRING-ARC-001)
Some checks are pending
ci / test (push) Waiting to run
Some checks are pending
ci / test (push) Waiting to run
This commit is contained in:
parent
22fd8e4216
commit
986e09a475
1 changed files with 20 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.example.demo.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.example.demo.service.TransactionService;
|
||||||
|
import com.example.demo.dto.TransactionDTO;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/transactions")
|
||||||
|
public class TransactionController {
|
||||||
|
private final TransactionService transactionService;
|
||||||
|
|
||||||
|
public TransactionController(TransactionService transactionService) {
|
||||||
|
this.transactionService = transactionService;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
public void createTransaction(@RequestBody TransactionDTO transactionDTO) {
|
||||||
|
transactionService.processTransaction(transactionDTO);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue