OBP 연계 API 주소 변경
This commit is contained in:
@@ -96,6 +96,8 @@
|
||||
<mvc:mapping path="/**" />
|
||||
<mvc:exclude-mapping path="/loginForm.do" />
|
||||
<mvc:exclude-mapping path="/_onl/**" />
|
||||
<mvc:exclude-mapping path="/kjb/**" />
|
||||
<mvc:exclude-mapping path="/api/**" />
|
||||
<bean
|
||||
class="com.eactive.eai.rms.common.interceptor.SessionCheckInterceptor" />
|
||||
</mvc:interceptor>
|
||||
@@ -103,6 +105,7 @@
|
||||
<mvc:mapping path="/**" />
|
||||
<mvc:exclude-mapping path="/_onl/**" />
|
||||
<mvc:exclude-mapping path="/kjb/**" />
|
||||
<mvc:exclude-mapping path="/api/**" />
|
||||
<bean class="com.eactive.eai.rms.common.interceptor.AuthorizeInterceptor" />
|
||||
</mvc:interceptor>
|
||||
<mvc:interceptor>
|
||||
@@ -111,11 +114,15 @@
|
||||
</mvc:interceptor>
|
||||
<mvc:interceptor>
|
||||
<mvc:mapping path="/**" />
|
||||
<mvc:exclude-mapping path="/kjb/**" />
|
||||
<mvc:exclude-mapping path="/api/**" />
|
||||
<bean
|
||||
class="com.eactive.eai.rms.common.interceptor.MenuInterceptor" />
|
||||
</mvc:interceptor>
|
||||
<mvc:interceptor>
|
||||
<mvc:mapping path="/**" />
|
||||
<mvc:exclude-mapping path="/kjb/**" />
|
||||
<mvc:exclude-mapping path="/api/**" />
|
||||
<bean id="localeChangeInterceptor"
|
||||
class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
|
||||
<property name="paramName" value="lang" />
|
||||
@@ -123,6 +130,8 @@
|
||||
</mvc:interceptor>
|
||||
<mvc:interceptor>
|
||||
<mvc:mapping path="/**" />
|
||||
<mvc:exclude-mapping path="/kjb/**" />
|
||||
<mvc:exclude-mapping path="/api/**" />
|
||||
<ref bean="auditLogInterceptor"/>
|
||||
</mvc:interceptor>
|
||||
<!-- <mvc:interceptor> <mvc:mapping path="/**"/> <bean class="com.eactive.eai.rms.common.interceptor.dynamicLog.DynamicLogInterceptor"/>
|
||||
|
||||
@@ -91,6 +91,10 @@
|
||||
</multipart-config>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>springapp</servlet-name>
|
||||
<url-pattern>/api/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>springapp</servlet-name>
|
||||
<url-pattern>*.do</url-pattern>
|
||||
@@ -111,10 +115,6 @@
|
||||
<servlet-name>springapp</servlet-name>
|
||||
<url-pattern>*.file</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>springapp</servlet-name>
|
||||
<url-pattern>/api/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<welcome-file-list>
|
||||
<welcome-file>/emergency.jsp</welcome-file>
|
||||
|
||||
+14
-1
@@ -9,5 +9,18 @@ GET {{emsUrl}}/kjb/gw-metrics/after-timeslice/2026-01-12_12:00:00.json?pretty=tr
|
||||
|
||||
|
||||
### API 목록
|
||||
GET {{emsUrl}}/kjb/apis.json
|
||||
# GET {{emsUrl}}/kjb/apis.json
|
||||
GET {{emsUrl}}/api/apis/KJB
|
||||
|
||||
|
||||
### API 목록 by 파트너 코드
|
||||
GET {{emsUrl}}/api/apis/000002-02/KJB
|
||||
|
||||
|
||||
### 트랜잭션 로그 조회
|
||||
GET {{emsUrl}}/api/transaction/log
|
||||
|
||||
|
||||
|
||||
###
|
||||
GET {{emsUrl}}/transaction/log
|
||||
@@ -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;
|
||||
|
||||
@@ -50,6 +51,7 @@ public class ObpGwMetricController extends BaseRestController {
|
||||
*/
|
||||
@RequestMapping(
|
||||
value = "/api/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