Spring Boot/Spring Batch 목표 아키텍처 정의 #4
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