feat: BY PASS API 등록 프로세스 설계 및 개발 (#63) #108

병합
HYOJIN feature/ISSUE-63-bypass-api-registration 에서 develop 로 19 commits 를 머지했습니다 2026-03-27 14:32:14 +09:00
Showing only changes of commit 39858bf4e3 - Show all commits

파일 보기

@ -1,5 +1,6 @@
package com.snp.batch.common.web.service;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.web.reactive.function.BodyInserters;
@ -91,6 +92,35 @@ public abstract class BaseBypassService<T> {
return response;
}
/**
* RAW GET 요청 JsonNode 반환 (응답 구조 그대로 패스스루)
*/
protected JsonNode fetchRawGet(Function<UriBuilder, URI> uriFunction) {
log.info("{} API GET 호출 (RAW)", displayName);
JsonNode response = webClient.get()
.uri(uriFunction)
.retrieve()
.bodyToMono(JsonNode.class)
.block();
log.info("{} API 응답 완료 (RAW)", displayName);
return response;
}
/**
* RAW POST 요청 JsonNode 반환 (응답 구조 그대로 패스스루)
*/
protected JsonNode fetchRawPost(Object body, Function<UriBuilder, URI> uriFunction) {
log.info("{} API POST 호출 (RAW)", displayName);
JsonNode response = webClient.post()
.uri(uriFunction)
.body(BodyInserters.fromValue(body))
.retrieve()
.bodyToMono(JsonNode.class)
.block();
log.info("{} API 응답 완료 (RAW)", displayName);
return response;
}
protected String getApiPath() {
return apiPath;
}