find adapter uri 수정

This commit is contained in:
25W0075
2025-11-26 17:47:05 +09:00
parent 605362b366
commit 8b0292d90c
@@ -1,286 +1,286 @@
package com.eactive.eai.adapter.controller; package com.eactive.eai.adapter.controller;
import java.util.Date; import java.util.Date;
import java.util.Properties; import java.util.Properties;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.eactive.eai.adapter.AdapterGroupVO; import com.eactive.eai.adapter.AdapterGroupVO;
import com.eactive.eai.adapter.AdapterManager; import com.eactive.eai.adapter.AdapterManager;
import com.eactive.eai.adapter.AdapterPropManager; import com.eactive.eai.adapter.AdapterPropManager;
import com.eactive.eai.adapter.AdapterVO; import com.eactive.eai.adapter.AdapterVO;
import com.eactive.eai.adapter.http.HttpStatusException; import com.eactive.eai.adapter.http.HttpStatusException;
import com.eactive.eai.adapter.http.dynamic.HttpAdapterServiceKey; import com.eactive.eai.adapter.http.dynamic.HttpAdapterServiceKey;
import com.eactive.eai.adapter.http.dynamic.HttpDynamicInAdapterManager; import com.eactive.eai.adapter.http.dynamic.HttpDynamicInAdapterManager;
import com.eactive.eai.adapter.http.dynamic.HttpDynamicInAdapterUri; import com.eactive.eai.adapter.http.dynamic.HttpDynamicInAdapterUri;
import com.eactive.eai.adapter.http.dynamic.filter.JwtAuthException; import com.eactive.eai.adapter.http.dynamic.filter.JwtAuthException;
import com.eactive.eai.adapter.service.ApiAdapterService; import com.eactive.eai.adapter.service.ApiAdapterService;
import com.eactive.eai.common.TransactionContextKeys; import com.eactive.eai.common.TransactionContextKeys;
import com.eactive.eai.common.exception.ExceptionUtil; import com.eactive.eai.common.exception.ExceptionUtil;
import com.eactive.eai.common.server.EAIServerManager; import com.eactive.eai.common.server.EAIServerManager;
import com.eactive.eai.common.stdmessage.STDMessageDAO; import com.eactive.eai.common.stdmessage.STDMessageDAO;
import com.eactive.eai.common.util.ApplicationContextProvider; import com.eactive.eai.common.util.ApplicationContextProvider;
import com.eactive.eai.common.util.DatetimeUtil; import com.eactive.eai.common.util.DatetimeUtil;
import com.eactive.eai.common.util.InboundErrorLogger; import com.eactive.eai.common.util.InboundErrorLogger;
import com.eactive.eai.common.util.Logger; import com.eactive.eai.common.util.Logger;
import com.eactive.eai.common.util.MessageUtil; import com.eactive.eai.common.util.MessageUtil;
import com.eactive.eai.common.util.UUIDGenerator; import com.eactive.eai.common.util.UUIDGenerator;
import com.eactive.eai.inbound.error.InboundErrorInfoVO; import com.eactive.eai.inbound.error.InboundErrorInfoVO;
import com.kjbank.encrypt.exchange.crypto.AES256Cipher; import com.kjbank.encrypt.exchange.crypto.AES256Cipher;
import com.kjbank.encrypt.exchange.crypto.AES256GCMCipher; import com.kjbank.encrypt.exchange.crypto.AES256GCMCipher;
import com.kjbank.encrypt.exchange.crypto.AESCipher; import com.kjbank.encrypt.exchange.crypto.AESCipher;
// jwhong // jwhong
import org.json.simple.JSONObject; import org.json.simple.JSONObject;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.sql.Timestamp; import java.sql.Timestamp;
import com.eactive.eai.data.entity.onl.stdmessage.StandardMessageInfo; import com.eactive.eai.data.entity.onl.stdmessage.StandardMessageInfo;
@RestController @RestController
public class ApiAdapterController implements HttpAdapterServiceKey { public class ApiAdapterController implements HttpAdapterServiceKey {
static Logger logger = Logger.getLogger(Logger.LOGGER_ADAPTER); static Logger logger = Logger.getLogger(Logger.LOGGER_ADAPTER);
@Autowired @Autowired
ApiAdapterService service; ApiAdapterService service;
/** /**
* KBANK 요구사항으로 /api/v1/oauth/token 과 같은 형태로 토큰 발급거래를 수행해야해서 예외처리함 * KBANK 요구사항으로 /api/v1/oauth/token 과 같은 형태로 토큰 발급거래를 수행해야해서 예외처리함
* @See com.eactive.eai.authserver.config.AuthorizationServerConfig.configure(AuthorizationServerEndpointsConfigurer endpoints) * @See com.eactive.eai.authserver.config.AuthorizationServerConfig.configure(AuthorizationServerEndpointsConfigurer endpoints)
*/ */
@RequestMapping(value = {"/api/*", "/mapi/*", "/api/*/{path:^(?!.*oauth).*$}/**", "/mapi/*/{path:^(?!.*oauth).*$}/**"}) @RequestMapping(value = {"/api/*", "/mapi/*", "/api/*/{path:^(?!.*oauth).*$}/**", "/mapi/*/{path:^(?!.*oauth).*$}/**"})
// @RequestMapping(value = {"/api/**"}) // @RequestMapping(value = {"/api/**"})
public ResponseEntity<String> callApi(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws Exception { public ResponseEntity<String> callApi(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws Exception {
// /ONLWeb/api/v1/public/getUserInfo.svc // /ONLWeb/api/v1/public/getUserInfo.svc
String apiUri = servletRequest.getRequestURI(); String apiUri = servletRequest.getRequestURI();
// /api/v1/public/getUserInfo.svc // /api/v1/public/getUserInfo.svc
apiUri = StringUtils.removeStart(apiUri, servletRequest.getContextPath()); apiUri = StringUtils.removeStart(apiUri, servletRequest.getContextPath());
apiUri = StringUtils.removeEnd(apiUri, "/"); apiUri = StringUtils.removeEnd(apiUri, "/");
HttpDynamicInAdapterUri adptUri = findAdptUri(apiUri, HttpDynamicInAdapterManager.getInstance()); HttpDynamicInAdapterUri adptUri = findAdptUri(apiUri, HttpDynamicInAdapterManager.getInstance());
//Received time , jwhong //Received time , jwhong
long receivedTimeMillis = System.currentTimeMillis(); long receivedTimeMillis = System.currentTimeMillis();
String receivedTimeStr = String.valueOf(receivedTimeMillis); String receivedTimeStr = String.valueOf(receivedTimeMillis);
if (logger.isDebug()) { if (logger.isDebug()) {
logger.debug("ApiAdapterController] service request uri : " + servletRequest.getRequestURI()); logger.debug("ApiAdapterController] service request uri : " + servletRequest.getRequestURI());
} }
if (adptUri == null) { if (adptUri == null) {
logError(servletRequest); logError(servletRequest);
// throw new Exception("can not find Adapter Uri"); // throw new Exception("can not find Adapter Uri");
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("can not find Adapter Uri"); return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("can not find Adapter Uri");
} }
String adapterGroupName = adptUri.getAdptGrpName(); String adapterGroupName = adptUri.getAdptGrpName();
String adapterName = adptUri.getAdptName(); String adapterName = adptUri.getAdptName();
AdapterGroupVO adapterGroupVO = AdapterManager.getInstance().getAdapterGroupVO(adapterGroupName); AdapterGroupVO adapterGroupVO = AdapterManager.getInstance().getAdapterGroupVO(adapterGroupName);
AdapterVO adapterVO = AdapterManager.getInstance().getAdapterVO(adapterGroupName, adapterName); AdapterVO adapterVO = AdapterManager.getInstance().getAdapterVO(adapterGroupName, adapterName);
if (adapterVO == null) { if (adapterVO == null) {
// throw new Exception("Adapter not found error"); // throw new Exception("Adapter not found error");
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Adapter not found error"); return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Adapter not found error");
} }
Properties httpProp = AdapterPropManager.getInstance().getProperties(adapterVO.getPropGroupName()); Properties httpProp = AdapterPropManager.getInstance().getProperties(adapterVO.getPropGroupName());
String adptMsgType = adapterVO.getAdapterGroupVO().getMessageType(); String adptMsgType = adapterVO.getAdapterGroupVO().getMessageType();
String encode = StringUtils.defaultIfBlank(adapterGroupVO.getMessageEncode(), "UTF-8"); String encode = StringUtils.defaultIfBlank(adapterGroupVO.getMessageEncode(), "UTF-8");
MediaType mediaType = MediaType.valueOf("application/json;charset=" + encode); MediaType mediaType = MediaType.valueOf("application/json;charset=" + encode);
String errorResponseFormat = httpProp.getProperty(ERROR_RESPONSE_FORMAT); String errorResponseFormat = httpProp.getProperty(ERROR_RESPONSE_FORMAT);
String responseType = httpProp.getProperty(RESPONSE_TYPE, "SYNC"); String responseType = httpProp.getProperty(RESPONSE_TYPE, "SYNC");
ResponseEntity responseEntity = null; ResponseEntity responseEntity = null;
Properties transactionProp = new Properties(); Properties transactionProp = new Properties();
//transactionProp.put(INBOUND_REQUESTED_TIME, receivedTimeMillis); // jwhong, put api received time //transactionProp.put(INBOUND_REQUESTED_TIME, receivedTimeMillis); // jwhong, put api received time
transactionProp.put(INBOUND_REQUESTED_TIME, receivedTimeStr); transactionProp.put(INBOUND_REQUESTED_TIME, receivedTimeStr);
try { try {
String responseData = service.callApi(servletRequest, servletResponse, httpProp, adapterGroupVO, adapterVO, transactionProp); String responseData = service.callApi(servletRequest, servletResponse, httpProp, adapterGroupVO, adapterVO, transactionProp);
// if (RESPONSE_TYPE_ASYNC.equals(responseType)) { // table의 값이 ASYNC 로 들어가 있는데 response_type_async는 ASYN 로 되어 있어 아래처럼 비교함 jwhong 2025 // if (RESPONSE_TYPE_ASYNC.equals(responseType)) { // table의 값이 ASYNC 로 들어가 있는데 response_type_async는 ASYN 로 되어 있어 아래처럼 비교함 jwhong 2025
if ("ASYNC".equals(responseType)) { if ("ASYNC".equals(responseType)) {
//responseEntity = ResponseEntity.ok("dummy"); // comment by jwhong //responseEntity = ResponseEntity.ok("dummy"); // comment by jwhong
servletResponse.addHeader("traceId", responseData); // uuid를 response header에 servletResponse.addHeader("traceId", responseData); // uuid를 response header에
int httpStatus = servletResponse.getStatus(); int httpStatus = servletResponse.getStatus();
if (httpStatus == 200) { if (httpStatus == 200) {
// 업체별 aync response message 가 다르다. // 업체별 aync response message 가 다르다.
String asyncMsgStyle = httpProp.getProperty("ASYNC_RTNMSG_TYPE", "").toUpperCase(); String asyncMsgStyle = httpProp.getProperty("ASYNC_RTNMSG_TYPE", "").toUpperCase();
String responseBody =""; String responseBody ="";
if (asyncMsgStyle == null || asyncMsgStyle.trim().isEmpty()) { if (asyncMsgStyle == null || asyncMsgStyle.trim().isEmpty()) {
responseBody = makeResponseBodyMsg(); responseBody = makeResponseBodyMsg();
} else { } else {
responseBody = asyncMsgStyle; responseBody = asyncMsgStyle;
} }
responseEntity = ResponseEntity.status(httpStatus).contentType(mediaType).body(responseBody); responseEntity = ResponseEntity.status(httpStatus).contentType(mediaType).body(responseBody);
// jwhong // jwhong
} else { } else {
responseEntity = ResponseEntity.status(httpStatus).contentType(mediaType).body(responseData); responseEntity = ResponseEntity.status(httpStatus).contentType(mediaType).body(responseData);
} }
} else { } else {
// responseEntity = ResponseEntity.ok().contentType(mediaType).body(responseData); // responseEntity = ResponseEntity.ok().contentType(mediaType).body(responseData);
// 버즈빌 포인트 적립 처리하기 위하여 정상응답이더라도 응답코드(apiRsltCd) 값이 200이 아닌 경우 처리를 위하여 수정 // 버즈빌 포인트 적립 처리하기 위하여 정상응답이더라도 응답코드(apiRsltCd) 값이 200이 아닌 경우 처리를 위하여 수정
// Filter에서 설정한 response status값을 responseEntity 생성시 적용 modify by lwk 2025.03.24 // Filter에서 설정한 response status값을 responseEntity 생성시 적용 modify by lwk 2025.03.24
int httpStatus = servletResponse.getStatus(); int httpStatus = servletResponse.getStatus();
if (httpStatus != 200) { if (httpStatus != 200) {
responseEntity = ResponseEntity.status(httpStatus).contentType(mediaType).body(responseData); responseEntity = ResponseEntity.status(httpStatus).contentType(mediaType).body(responseData);
} else { } else {
responseEntity = ResponseEntity.ok().contentType(mediaType).body(responseData); responseEntity = ResponseEntity.ok().contentType(mediaType).body(responseData);
} }
} }
} catch (HttpStatusException e) { } catch (HttpStatusException e) {
logger.warn("ApiAdapterController] " + adapterGroupName + "-" + adapterName + ">>" + e.getMessage()); logger.warn("ApiAdapterController] " + adapterGroupName + "-" + adapterName + ">>" + e.getMessage());
String errorMsg = MessageUtil.makeErrorMessageByMessageType(adptMsgType, encode, e.getCode(), String errorMsg = MessageUtil.makeErrorMessageByMessageType(adptMsgType, encode, e.getCode(),
e.getMessage(), errorResponseFormat); e.getMessage(), errorResponseFormat);
responseEntity = ResponseEntity.status(e.getStatus()).contentType(mediaType).body(errorMsg); responseEntity = ResponseEntity.status(e.getStatus()).contentType(mediaType).body(errorMsg);
} catch (JwtAuthException e) { } catch (JwtAuthException e) {
logger.error(adapterGroupName + "-" + adapterName + ">>" + e.getMessage(), e); logger.error(adapterGroupName + "-" + adapterName + ">>" + e.getMessage(), e);
String errorMsg = MessageUtil.makeErrorMessageByMessageType(adptMsgType, encode, e.getCode(), String errorMsg = MessageUtil.makeErrorMessageByMessageType(adptMsgType, encode, e.getCode(),
e.getMessage(), errorResponseFormat); e.getMessage(), errorResponseFormat);
responseEntity = ResponseEntity.status(HttpStatus.UNAUTHORIZED).contentType(mediaType).body(errorMsg); responseEntity = ResponseEntity.status(HttpStatus.UNAUTHORIZED).contentType(mediaType).body(errorMsg);
} catch (Exception e) { } catch (Exception e) {
logger.error(adapterGroupName + "-" + adapterName + ">>" + e.getMessage(), e); logger.error(adapterGroupName + "-" + adapterName + ">>" + e.getMessage(), e);
responseEntity = ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).contentType(mediaType).body(e); responseEntity = ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).contentType(mediaType).body(e);
} finally { } finally {
/** /**
* 로깅 인터셉터에 데이터를 전달하기 위한 처리 * 로깅 인터셉터에 데이터를 전달하기 위한 처리
* 이미 거래처리가 끝나서 영향도가 없을만한 servletRequest에 Attribute로 전달 * 이미 거래처리가 끝나서 영향도가 없을만한 servletRequest에 Attribute로 전달
* 추후 더 좋은방법이 생길경우 개선 요망 * 추후 더 좋은방법이 생길경우 개선 요망
*/ */
servletRequest.setAttribute(TransactionContextKeys.TRANSACTION_PROP, transactionProp); servletRequest.setAttribute(TransactionContextKeys.TRANSACTION_PROP, transactionProp);
} }
return responseEntity; return responseEntity;
} }
/** /**
* url에서 뒤쪽 /이후를 제거하면서 찾는다.<br> * url에서 뒤쪽 /이후를 제거하면서 찾는다.<br>
* /api/v1/public/getUserInfo.svc * /api/v1/public/getUserInfo.svc
* *
* @param apiUri * @param apiUri
* @return * @return
*/ */
private HttpDynamicInAdapterUri findAdptUri(String apiUri, HttpDynamicInAdapterManager manager) throws Exception { private HttpDynamicInAdapterUri findAdptUri(String apiUri, HttpDynamicInAdapterManager manager) throws Exception {
if (StringUtils.isBlank(apiUri)) { if (StringUtils.isBlank(apiUri)) {
return null; return null;
} }
//** jwhong TSEAIHS04의 api full path와 비교하여 adapter를 가져온다 //** jwhong TSEAIHS04의 api full path와 비교하여 adapter를 가져온다
STDMessageDAO dao = ApplicationContextProvider.getContext().getBean(STDMessageDAO.class); STDMessageDAO dao = ApplicationContextProvider.getContext().getBean(STDMessageDAO.class);
StandardMessageInfo stdInfo = dao.getSTDMsgByPath(apiUri); StandardMessageInfo stdInfo = dao.getSTDMsgByPath(apiUri);
String serviceKey = stdInfo.getBzwksvckeyname(); String serviceKey = stdInfo.getBzwksvckeyname();
int idx = serviceKey.indexOf(":"); int idx = serviceKey.indexOf(":");
String adapterGrpName = (idx != -1) ? serviceKey.substring(0, idx) : serviceKey; // ':' 이전 문자열 추출 String adapterGrpName = (idx != -1) ? serviceKey.substring(0, idx) : serviceKey; // ':' 이전 문자열 추출
//*** //***
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
HttpDynamicInAdapterUri adptUri = manager.getAdptUri(apiUri); HttpDynamicInAdapterUri adptUri = manager.getAdptUri(apiUri);
if (adptUri != null) { if (adptUri != null) {
if (adptUri.getAdptGrpName().equals(adapterGrpName)) { if (adptUri.getAdptGrpName().equals(adapterGrpName)) {
return adptUri; return adptUri;
} }
} }
// /api/v1/public // /api/v1/public
apiUri = StringUtils.substringBeforeLast(apiUri, "/"); apiUri = StringUtils.substringBeforeLast(apiUri, "/");
if (apiUri.length() < 4) { // /api if (apiUri.length() < 4) { // /api
return null; return null;
} }
} }
return null; return null;
} }
private void logError(HttpServletRequest request) { private void logError(HttpServletRequest request) {
InboundErrorInfoVO errorInfoVO = new InboundErrorInfoVO(); InboundErrorInfoVO errorInfoVO = new InboundErrorInfoVO();
EAIServerManager eaiServerManager = EAIServerManager.getInstance(); EAIServerManager eaiServerManager = EAIServerManager.getInstance();
String serverName = eaiServerManager.getLocalServerName(); String serverName = eaiServerManager.getLocalServerName();
String uuid = null; String uuid = null;
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
String instanceid1 = serverName.substring(0, 2); String instanceid1 = serverName.substring(0, 2);
String instanceid2 = serverName.substring(serverName.length() - 2, serverName.length()); String instanceid2 = serverName.substring(serverName.length() - 2, serverName.length());
String instid = instanceid1 + instanceid2; String instid = instanceid1 + instanceid2;
uuid = instid + UUIDGenerator.getUUID(); uuid = instid + UUIDGenerator.getUUID();
String[] msgArgs = new String[1]; String[] msgArgs = new String[1];
msgArgs[0] = request.getRequestURI(); msgArgs[0] = request.getRequestURI();
String errorCode = "RECEAIIRP010"; String errorCode = "RECEAIIRP010";
String errorMsg = ExceptionUtil.make(new Exception("cat not find uri"), errorCode, msgArgs); String errorMsg = ExceptionUtil.make(new Exception("cat not find uri"), errorCode, msgArgs);
errorInfoVO.setEaiSvcSno(uuid); // EAI서비스일련번호 errorInfoVO.setEaiSvcSno(uuid); // EAI서비스일련번호
errorInfoVO.setAdptBwkGrpNm("HTTP_IN_NO_URI"); // 어댑터업무그룹명 errorInfoVO.setAdptBwkGrpNm("HTTP_IN_NO_URI"); // 어댑터업무그룹명
errorInfoVO.setErrCd(errorCode); // 에러코드 errorInfoVO.setErrCd(errorCode); // 에러코드
errorInfoVO.setErrTxt(errorMsg); // 에러내용 errorInfoVO.setErrTxt(errorMsg); // 에러내용
errorInfoVO.setErrTm(DatetimeUtil.getCurrentTime(new Date().getTime())); // 에러발생시각 errorInfoVO.setErrTm(DatetimeUtil.getCurrentTime(new Date().getTime())); // 에러발생시각
errorInfoVO.setErrDstcd(" "); errorInfoVO.setErrDstcd(" ");
sb.append("Remote Addr : ").append(request.getRemoteAddr()).append("\n").append("Request URI : ") sb.append("Remote Addr : ").append(request.getRemoteAddr()).append("\n").append("Request URI : ")
.append(request.getRequestURI()); .append(request.getRequestURI());
errorInfoVO.setBwkDataTxt(sb.toString()); // 업무데이터내용 errorInfoVO.setBwkDataTxt(sb.toString()); // 업무데이터내용
errorInfoVO.setEaiSvrInstNm(serverName); // EAI서버인스턴스명 errorInfoVO.setEaiSvrInstNm(serverName); // EAI서버인스턴스명
InboundErrorLogger.error(errorInfoVO); InboundErrorLogger.error(errorInfoVO);
} }
private String makeResponseBodyMsg() { private String makeResponseBodyMsg() {
Map<String, Object> dataMap = new HashMap<>(); Map<String, Object> dataMap = new HashMap<>();
dataMap.put("result", 1); dataMap.put("result", 1);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("code", "200"); map.put("code", "200");
map.put("data", dataMap); map.put("data", dataMap);
map.put("message", "정상 처리 되었습니다."); map.put("message", "정상 처리 되었습니다.");
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.putAll(map); json.putAll(map);
return json.toJSONString(); return json.toJSONString();
} }
/* /*
private String makeResponseBodyMsg(String asyncMsgStyle) { private String makeResponseBodyMsg(String asyncMsgStyle) {
Map<String, Object> dataMap = new HashMap<>(); Map<String, Object> dataMap = new HashMap<>();
dataMap.put("result", 1); dataMap.put("result", 1);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
switch (asyncMsgStyle) { switch (asyncMsgStyle) {
case "TB_SUC": case "TB_SUC":
map.put("rspCode", "TB_SUC_000"); map.put("rspCode", "TB_SUC_000");
map.put("rspMsg", "정상"); map.put("rspMsg", "정상");
map.put("data", dataMap); map.put("data", dataMap);
break; break;
case "ONLYDATA": case "ONLYDATA":
map.put("data", dataMap); map.put("data", dataMap);
map.put("success", "true"); map.put("success", "true");
break; break;
default: default:
map.put("code", "200"); map.put("code", "200");
map.put("data", dataMap); map.put("data", dataMap);
map.put("message", "정상 처리 되었습니다."); map.put("message", "정상 처리 되었습니다.");
break; break;
} }
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.putAll(map); json.putAll(map);
return json.toJSONString(); return json.toJSONString();
} }
*/ */
} }