get /api/transaction/log
This commit is contained in:
@@ -10,11 +10,11 @@ import com.fasterxml.jackson.core.type.TypeReference;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.java.Log;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
@@ -33,9 +33,17 @@ public class ApiTransactionLogController extends BaseRestController {
|
|||||||
private final EAILogService eaiLogService;
|
private final EAILogService eaiLogService;
|
||||||
private final ObjectMapper objectMapper = new ObjectMapper();
|
private final ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/transaction/log")
|
||||||
|
public ResponseEntity<ApiLogUI> getApiLog(String txDate, String apiServiceNumber) {
|
||||||
|
return getApiLog(new LogRequestBody() {{
|
||||||
|
setTxDate(txDate);
|
||||||
|
setApiServiceNumber(apiServiceNumber);
|
||||||
|
}});
|
||||||
|
}
|
||||||
|
|
||||||
// 이중 매핑 문제를 해결하기 위해 (예: /api/transaction/log.do 와 /transaction/log.do) '.do' 확장자를 제거함.
|
// 이중 매핑 문제를 해결하기 위해 (예: /api/transaction/log.do 와 /transaction/log.do) '.do' 확장자를 제거함.
|
||||||
// 이제 이 엔드포인트는 /api/transaction/log 를 통해서만 접근 가능하며, API 컨벤션에 맞춰 단일하고 명확한 접근 지점을 보장함.
|
// 이제 이 엔드포인트는 /api/transaction/log 를 통해서만 접근 가능하며, API 컨벤션에 맞춰 단일하고 명확한 접근 지점을 보장함.
|
||||||
// @GetMapping("/transaction/log")
|
|
||||||
@PostMapping("/transaction/log")
|
@PostMapping("/transaction/log")
|
||||||
public ResponseEntity<ApiLogUI> getApiLog(@RequestBody LogRequestBody requestBody) {
|
public ResponseEntity<ApiLogUI> getApiLog(@RequestBody LogRequestBody requestBody) {
|
||||||
DataSourceContextHolder.setDataSourceType(DataSourceTypeManager.getDataSourceType(DataSourceTypeManager.APIGW));
|
DataSourceContextHolder.setDataSourceType(DataSourceTypeManager.getDataSourceType(DataSourceTypeManager.APIGW));
|
||||||
|
|||||||
Reference in New Issue
Block a user