Merge branch 'jenkins_with_weblogic' of http://192.168.240.178:18080/eapim/eapim-admin.git into jenkins_with_weblogic
This commit is contained in:
@@ -29,6 +29,8 @@ import java.nio.charset.StandardCharsets;
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* TODO: API Key 또는 IP 화이트리스트 인증 기능 추가 고려
|
||||
*/
|
||||
public abstract class BaseRestController implements InterceptorSkipController {
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
@@ -38,7 +39,7 @@ public class ObpApiController extends BaseRestController {
|
||||
* @param pretty true면 JSON 들여쓰기 적용
|
||||
* @return JSON Array
|
||||
*/
|
||||
@RequestMapping(value = "/api/apis/{providerCode}", produces = JSON_CONTENT_TYPE)
|
||||
@RequestMapping(value = "/apis/{providerCode}", method = RequestMethod.GET, produces = JSON_CONTENT_TYPE)
|
||||
@ResponseBody
|
||||
public String getApisV2(
|
||||
@PathVariable("providerCode") String providerCode,
|
||||
@@ -80,7 +81,8 @@ public class ObpApiController extends BaseRestController {
|
||||
* @return JSON Array (기관 미존재 시 빈 배열)
|
||||
*/
|
||||
@RequestMapping(
|
||||
value = "/api/apis/{orgCode}/{providerCode}",
|
||||
value = "/apis/{orgCode}/{providerCode}",
|
||||
method = RequestMethod.GET,
|
||||
produces = JSON_CONTENT_TYPE
|
||||
)
|
||||
@ResponseBody
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
@@ -49,7 +50,8 @@ public class ObpGwMetricController extends BaseRestController {
|
||||
* @return JSON Array (해당 시간대 이후의 모든 지표)
|
||||
*/
|
||||
@RequestMapping(
|
||||
value = "/api/metrics/afterTimeslice/{timeslice}/{providerCode}",
|
||||
value = "/metrics/afterTimeslice/{timeslice}/{providerCode}",
|
||||
method = RequestMethod.GET,
|
||||
produces = JSON_CONTENT_TYPE
|
||||
)
|
||||
@ResponseBody
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
package com.eactive.ext.kjb.web;
|
||||
|
||||
import com.eactive.eai.rms.common.datasource.DataSourceContextHolder;
|
||||
import com.eactive.eai.rms.common.datasource.DataSourceTypeManager;
|
||||
import com.eactive.eai.rms.data.entity.onl.logger.ApiLogDTO;
|
||||
import com.eactive.eai.rms.data.entity.onl.logger.ApiMessageLogDTO;
|
||||
import com.eactive.eai.rms.data.entity.onl.logger.EAILogService;
|
||||
import com.eactive.eai.rms.onl.apim.common.BaseRestController;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.HashMap;
|
||||
@@ -7,35 +23,18 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import com.eactive.eai.rms.common.datasource.DataSourceContextHolder;
|
||||
import com.eactive.eai.rms.common.datasource.DataSourceTypeManager;
|
||||
import com.eactive.eai.rms.common.interceptor.InterceptorSkipController;
|
||||
import com.eactive.eai.rms.data.entity.onl.logger.ApiLogDTO;
|
||||
import com.eactive.eai.rms.data.entity.onl.logger.ApiMessageLogDTO;
|
||||
import com.eactive.eai.rms.data.entity.onl.logger.EAILogService;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@Controller
|
||||
@RequiredArgsConstructor
|
||||
public class ApiTransactionLogController implements InterceptorSkipController {
|
||||
public class ApiTransactionLogController extends BaseRestController {
|
||||
|
||||
private final EAILogService eaiLogService;
|
||||
private final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
@GetMapping("/api/transaction/log.do")
|
||||
@PostMapping("/api/transaction/log.do")
|
||||
// 이중 매핑 문제를 해결하기 위해 (예: /api/transaction/log.do 와 /transaction/log.do) '.do' 확장자를 제거함.
|
||||
// 이제 이 엔드포인트는 /api/transaction/log 를 통해서만 접근 가능하며, API 컨벤션에 맞춰 단일하고 명확한 접근 지점을 보장함.
|
||||
@GetMapping("/transaction/log")
|
||||
@PostMapping("/transaction/log")
|
||||
public ResponseEntity<ApiLogUI> getApiLog(String txDate, String apiServiceNumber) {
|
||||
DataSourceContextHolder.setDataSourceType(DataSourceTypeManager.getDataSourceType(DataSourceTypeManager.APIGW));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user