refactor: 패키지 정리

dev
gitea-관리자 1 year ago
parent e1f37bbe5f
commit 49e964378c

@ -1,10 +0,0 @@
/**
* ENS business packages
* <p>
* : ens
* </p>
* @since 1.0
* @author limju
* @version 1.0
*/
package kr.xit.biz.ens;

@ -1,14 +1,14 @@
package kr.xit.biz.ens.mapper; package kr.xit.biz.kakao.mapper;
import kr.xit.biz.ens.model.KkoMyDocDTO.MobilePageManage;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken;
import kr.xit.biz.kakao.model.KkoMyDocDTO.MobilePageManage;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
/** /**
* <pre> * <pre>
* description : API mapper * description : API mapper
* *
* packageName : kr.xit.biz.ens.mapper * packageName : kr.xit.biz.kakao.mapper
* fileName : IKkoMyDocMapper * fileName : IKkoMyDocMapper
* author : limju * author : limju
* date : 2023-08-31 * date : 2023-08-31

@ -1,19 +1,20 @@
package kr.xit.biz.ens.model; package kr.xit.biz.kakao.model;
import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import java.io.Serializable;
import lombok.*; import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/** /**
* <pre> * <pre>
* description : DTO * description : DTO
* *
* packageName : kr.xit.biz.ens.model * packageName : kr.xit.biz.kakao.model
* fileName : KkoMyDocDTO * fileName : KkoMyDocDTO
* author : limju * author : limju
* date : 2023-08-31 * date : 2023-08-31

@ -0,0 +1,10 @@
/**
* kakao ENS business packages
* <p>
* : kakao
* </p>
* @since 1.0
* @author limju
* @version 1.0
*/
package kr.xit.biz.kakao;

@ -1,4 +1,4 @@
package kr.xit.biz.ens.service; package kr.xit.biz.kakao.service;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken;
import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.model.ApiResponseDTO;
@ -7,7 +7,7 @@ import kr.xit.core.model.ApiResponseDTO;
* <pre> * <pre>
* description : API Service Interface * description : API Service Interface
* *
* packageName : kr.xit.biz.ens.service * packageName : kr.xit.biz.kakao.service
* fileName : IKkoMyDocService * fileName : IKkoMyDocService
* author : limju * author : limju
* date : 2023-08-31 * date : 2023-08-31

@ -1,24 +1,23 @@
package kr.xit.biz.ens.service; package kr.xit.biz.kakao.service;
import kr.xit.biz.ens.mapper.IKkoMyDocMapper;
import kr.xit.biz.ens.model.KkoMyDocDTO.MobilePageManage;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO; import kr.xit.biz.ens.model.kakao.KkopayDocDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken;
import kr.xit.biz.kakao.mapper.IKkoMyDocMapper;
import kr.xit.biz.kakao.model.KkoMyDocDTO.MobilePageManage;
import kr.xit.core.consts.ErrorCode; import kr.xit.core.consts.ErrorCode;
import kr.xit.ens.support.kakao.service.IKkopayEltrcDocService;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.stereotype.Service;
import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.support.utils.Checks; import kr.xit.core.support.utils.Checks;
import kr.xit.ens.kakao.service.IKkopayEltrcDocService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.stereotype.Service;
/** /**
* <pre> * <pre>
* description : API Service * description : API Service
* *
* packageName : kr.xit.biz.ens.service * packageName : kr.xit.biz.kakao.service
* fileName : KkoMyDocService * fileName : KkoMyDocService
* author : limju * author : limju
* date : 2023-08-31 * date : 2023-08-31

@ -1,9 +1,9 @@
package kr.xit.biz.ens.web; package kr.xit.biz.kakao.web;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken;
import kr.xit.biz.ens.service.IKkoMyDocService; import kr.xit.biz.kakao.service.IKkoMyDocService;
import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.model.ApiResponseDTO;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
* <pre> * <pre>
* description : API Controller * description : API Controller
* *
* packageName : kr.xit.biz.ens.web * packageName : kr.xit.biz.kakao.web
* fileName : KkoMyDocController * fileName : KkoMyDocController
* author : limju * author : limju
* date : 2023-08-31 * date : 2023-08-31
@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.RestController;
@Tag(name = "KkoMyDocController", description = "카카오페이 전자문서 API Controller") @Tag(name = "KkoMyDocController", description = "카카오페이 전자문서 API Controller")
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController
@RequestMapping(value = "/api/ens/v1") @RequestMapping(value = "/api/biz/kakao/v1")
public class KkoMyDocController { public class KkoMyDocController {
private final IKkoMyDocService service; private final IKkoMyDocService service;

@ -1,4 +1,4 @@
package kr.xit.ens.support.cmm.mapper; package kr.xit.ens.cmm.mapper;
import kr.xit.biz.ens.model.nice.NiceCiDTO.CrtfInfo; import kr.xit.biz.ens.model.nice.NiceCiDTO.CrtfInfo;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
@ -8,7 +8,7 @@ import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
* description : mapper * description : mapper
* - cache: CaffeineCache use * - cache: CaffeineCache use
* *
* packageName : kr.xit.ens.support.cmm.mapper * packageName : kr.xit.ens.cmm.mapper
* fileName : ICmmEnsMapper * fileName : ICmmEnsMapper
* author : limju * author : limju
* date : 2023-09-12 * date : 2023-09-12

@ -1,9 +1,9 @@
package kr.xit.ens.support.cmm.service; package kr.xit.ens.cmm.service;
import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.stats.CacheStats; import com.github.benmanes.caffeine.cache.stats.CacheStats;
import kr.xit.biz.ens.model.nice.NiceCiDTO.CrtfInfo; import kr.xit.biz.ens.model.nice.NiceCiDTO.CrtfInfo;
import kr.xit.ens.support.cmm.mapper.ICmmEnsMapper; import kr.xit.ens.cmm.mapper.ICmmEnsMapper;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;

@ -1,4 +1,4 @@
package kr.xit.ens.support.cmm.service; package kr.xit.ens.cmm.service;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -29,7 +29,7 @@ import org.springframework.web.multipart.MultipartFile;
* <pre> * <pre>
* description : * description :
* *
* packageName : kr.xit.ens.support.cmm.service * packageName : kr.xit.ens.cmm.service
* fileName : CmmEnsFileService * fileName : CmmEnsFileService
* author : limju * author : limju
* date : 2023-09-05 * date : 2023-09-05
@ -43,7 +43,7 @@ import org.springframework.web.multipart.MultipartFile;
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
@Service @Service
public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEnsFileService{ public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEnsFileService {
private final static int FMC_EXCEL_DATA_START_ROW = 3; private final static int FMC_EXCEL_DATA_START_ROW = 3;
private final static int FMC_EXCEL_CELL_CNT = 7; private final static int FMC_EXCEL_CELL_CNT = 7;

@ -1,4 +1,4 @@
package kr.xit.ens.support.cmm.service; package kr.xit.ens.cmm.service;
import kr.xit.biz.ens.model.nice.NiceCiDTO.CrtfInfo; import kr.xit.biz.ens.model.nice.NiceCiDTO.CrtfInfo;
@ -6,7 +6,7 @@ import kr.xit.biz.ens.model.nice.NiceCiDTO.CrtfInfo;
* <pre> * <pre>
* description : CaffeineCache * description : CaffeineCache
* *
* packageName : kr.xit.ens.support.cmm.service * packageName : kr.xit.ens.cmm.service
* fileName : ICmmEnsCacheService * fileName : ICmmEnsCacheService
* author : limju * author : limju
* date : 2023-09-12 * date : 2023-09-12

@ -1,4 +1,4 @@
package kr.xit.ens.support.cmm.service; package kr.xit.ens.cmm.service;
import kr.xit.biz.ens.model.cmm.CmmEnsFileDTO.FmcExcelUpload; import kr.xit.biz.ens.model.cmm.CmmEnsFileDTO.FmcExcelUpload;
@ -6,7 +6,7 @@ import kr.xit.biz.ens.model.cmm.CmmEnsFileDTO.FmcExcelUpload;
* <pre> * <pre>
* description : * description :
* *
* packageName : kr.xit.ens.support.cmm.service * packageName : kr.xit.ens.cmm.service
* fileName : ICmmEnsFileService * fileName : ICmmEnsFileService
* author : limju * author : limju
* date : 2023-09-05 * date : 2023-09-05

@ -1,10 +1,10 @@
package kr.xit.ens.support.cmm.web; package kr.xit.ens.cmm.web;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.cmm.CmmEnsFileDTO.FmcExcelUpload; import kr.xit.biz.ens.model.cmm.CmmEnsFileDTO.FmcExcelUpload;
import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.model.ApiResponseDTO;
import kr.xit.ens.support.cmm.service.ICmmEnsFileService; import kr.xit.ens.cmm.service.ICmmEnsFileService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
* <pre> * <pre>
* description : * description :
* *
* packageName : kr.xit.ens.support.cmm.web * packageName : kr.xit.ens.cmm.web
* fileName : CmmFileMgtController * fileName : CmmFileMgtController
* author : limju * author : limju
* date : 2023-09-04 * date : 2023-09-04
@ -32,7 +32,7 @@ import org.springframework.web.bind.annotation.RestController;
@Tag(name = "CmmEnsFileController", description = "전자고지 연계 파일 관련 처리") @Tag(name = "CmmEnsFileController", description = "전자고지 연계 파일 관련 처리")
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController
@RequestMapping(value = "/api/cmm") @RequestMapping(value = "/api/ens/cmm")
public class CmmEnsFileController { public class CmmEnsFileController {
private final ICmmEnsFileService service; private final ICmmEnsFileService service;

@ -1,4 +1,4 @@
package kr.xit.ens.support.kakao.service; package kr.xit.ens.kakao.service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -6,11 +6,9 @@ import java.util.Objects;
import java.util.Set; import java.util.Set;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.validation.ConstraintViolation; import javax.validation.ConstraintViolation;
import javax.validation.Validation; import javax.validation.Validation;
import javax.validation.Validator; import javax.validation.Validator;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid; import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.Receiver; import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.Receiver;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests;
@ -23,25 +21,24 @@ import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendResponse; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendResponse;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenRequest; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenResponse; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenResponse;
import kr.xit.core.spring.util.ApiWebClientUtil;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.spring.annotation.TraceLogging; import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.spring.util.ApiWebClientUtil;
import kr.xit.core.support.utils.Checks; import kr.xit.core.support.utils.Checks;
import kr.xit.core.support.utils.JsonUtils; import kr.xit.core.support.utils.JsonUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
/** /**
* <pre> * <pre>
* description : * description :
* packageName : kr.xit.ens.support.kakao.service * packageName : kr.xit.ens.kakao.service
* fileName : KkopayEltrcDocService * fileName : KkopayEltrcDocService
* author : julim * author : julim
* date : 2023-04-28 * date : 2023-04-28
@ -56,7 +53,8 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
@Component @Component
public class AsyncKkopayEltrcDocService extends EgovAbstractServiceImpl implements IAsyncKkopayEltrcDocService { public class AsyncKkopayEltrcDocService extends EgovAbstractServiceImpl implements
IAsyncKkopayEltrcDocService {
@Value("${contract.kakao.host}") @Value("${contract.kakao.host}")
private String HOST; private String HOST;

@ -1,15 +1,11 @@
package kr.xit.ens.support.kakao.service; package kr.xit.ens.kakao.service;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid; import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusResponses; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.DocStatusResponse; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.DocStatusResponse;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendResponse; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendResponse;
@ -20,7 +16,7 @@ import kr.xit.core.model.ApiResponseDTO;
/** /**
* <pre> * <pre>
* description : * description :
* packageName : kr.xit.ens.support.kakao.service * packageName : kr.xit.ens.kakao.service
* fileName : IKkopayEltrcDocService * fileName : IKkopayEltrcDocService
* author : julim * author : julim
* date : 2023-04-28 * date : 2023-04-28

@ -1,13 +1,10 @@
package kr.xit.ens.support.kakao.service; package kr.xit.ens.kakao.service;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid; import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusResponses; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.DocStatusResponse; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.DocStatusResponse;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest;
@ -19,7 +16,7 @@ import kr.xit.core.model.ApiResponseDTO;
/** /**
* <pre> * <pre>
* description : * description :
* packageName : kr.xit.ens.support.kakao.service * packageName : kr.xit.ens.kakao.service
* fileName : IKkopayEltrcDocService * fileName : IKkopayEltrcDocService
* author : julim * author : julim
* date : 2023-04-28 * date : 2023-04-28
@ -103,6 +100,6 @@ public interface IKkopayEltrcDocService {
BulkStatusResponses findBulkStatus(final BulkStatusRequests reqDTO); BulkStatusResponses findBulkStatus(final BulkStatusRequests reqDTO);
ApiResponseDTO<KkopayDocDTO.ValidTokenResponse> findMyDocReadyAndMblPage(OneTimeToken reqDTO); ApiResponseDTO<ValidTokenResponse> findMyDocReadyAndMblPage(OneTimeToken reqDTO);
} }

@ -1,11 +1,13 @@
package kr.xit.ens.support.kakao.service; package kr.xit.ens.kakao.service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid; import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.Receiver; import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.Receiver;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendReq; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendReq;
@ -13,7 +15,6 @@ import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusResponses; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.DocStatusResponse; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.DocStatusResponse;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.RequestSend; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.RequestSend;
@ -28,24 +29,18 @@ import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.spring.util.ApiWebClientUtil; import kr.xit.core.spring.util.ApiWebClientUtil;
import kr.xit.core.support.utils.Checks; import kr.xit.core.support.utils.Checks;
import kr.xit.core.support.utils.JsonUtils; import kr.xit.core.support.utils.JsonUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.*; import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
/** /**
* <pre> * <pre>
* description : * description :
* packageName : kr.xit.ens.support.kakao.service * packageName : kr.xit.ens.kakao.service
* fileName : KkopayEltrcDocService * fileName : KkopayEltrcDocService
* author : julim * author : julim
* date : 2023-04-28 * date : 2023-04-28
@ -59,7 +54,8 @@ import javax.validation.Validator;
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
@Component @Component
public class KkopayEltrcDocService extends EgovAbstractServiceImpl implements IKkopayEltrcDocService { public class KkopayEltrcDocService extends EgovAbstractServiceImpl implements
IKkopayEltrcDocService {
@Value("${contract.kakao.host}") @Value("${contract.kakao.host}")
private String HOST; private String HOST;
@ -262,7 +258,7 @@ public class KkopayEltrcDocService extends EgovAbstractServiceImpl implements IK
} }
@Override @Override
public ApiResponseDTO<KkopayDocDTO.ValidTokenResponse> findMyDocReadyAndMblPage(OneTimeToken reqDTO) { public ApiResponseDTO<ValidTokenResponse> findMyDocReadyAndMblPage(OneTimeToken reqDTO) {
String url = HOST + API_VALID_TOKEN[0].replace(DOCUMENT_BINDER_UUID, reqDTO.getDocument_binder_uuid()) String url = HOST + API_VALID_TOKEN[0].replace(DOCUMENT_BINDER_UUID, reqDTO.getDocument_binder_uuid())
.replace("{tokens}", reqDTO.getToken()); .replace("{tokens}", reqDTO.getToken());

@ -1,26 +1,28 @@
package kr.xit.ens.support.kakao.web; package kr.xit.ens.kakao.web;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid; import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenRequest; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenRequest;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.model.ApiResponseDTO;
import kr.xit.ens.support.kakao.service.IAsyncKkopayEltrcDocService; import kr.xit.ens.kakao.service.IAsyncKkopayEltrcDocService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/** /**
* <pre> * <pre>
* description : controller * description : controller
* packageName : kr.xit.ens.support.kakao.web * packageName : kr.xit.ens.kakao.web
* fileName : AsyncKkopayEltrcDocController * fileName : AsyncKkopayEltrcDocController
* author : julim * author : julim
* date : 2023-04-28 * date : 2023-04-28
@ -35,7 +37,7 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController
@RequestMapping(value = "/api/kakaopay/v2") @RequestMapping(value = "/api/ens/kakao/v2")
public class AsyncKkopayEltrcDocController { public class AsyncKkopayEltrcDocController {
private final IAsyncKkopayEltrcDocService service; private final IAsyncKkopayEltrcDocService service;

@ -1,4 +1,4 @@
package kr.xit.ens.support.kakao.web; package kr.xit.ens.kakao.web;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Content;
@ -10,19 +10,20 @@ import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenRequest; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenRequest;
import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.model.ApiResponseDTO;
import kr.xit.ens.kakao.service.IKkopayEltrcDocService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import kr.xit.ens.support.kakao.service.IKkopayEltrcDocService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/** /**
* <pre> * <pre>
* description : controller * description : controller
* packageName : kr.xit.ens.support.kakao.web * packageName : kr.xit.ens.kakao.web
* fileName : KkopayEltrcDocController * fileName : KkopayEltrcDocController
* author : julim * author : julim
* date : 2023-04-28 * date : 2023-04-28
@ -37,7 +38,7 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController
@RequestMapping(value = "/api/kakaopay/v1") @RequestMapping(value = "/api/ens/kakao/v1")
public class KkopayEltrcDocController { public class KkopayEltrcDocController {
@Value("${contract.kakao.token}") @Value("${contract.kakao.token}")
private String accessToken; private String accessToken;

@ -1,4 +1,4 @@
package kr.xit.ens.support.nice.service; package kr.xit.ens.nice.service;
import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyRequest; import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyRequest;
import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyResponse; import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyResponse;
@ -7,12 +7,13 @@ import kr.xit.biz.ens.model.nice.NiceCiDTO.SymmetrickeyRegResDataBody;
import kr.xit.biz.ens.model.nice.NiceCiDTO.SymmetrickeyRegResponse; import kr.xit.biz.ens.model.nice.NiceCiDTO.SymmetrickeyRegResponse;
import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRequest; import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRequest;
import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenResponse; import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenResponse;
import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRevokeResponse;
/** /**
* <pre> * <pre>
* description : * description :
* *
* packageName : kr.xit.ens.support.nice.service * packageName : kr.xit.ens.nice.service
* fileName : INiceCiService * fileName : INiceCiService
* author : limju * author : limju
* date : 2023-09-06 * date : 2023-09-06
@ -28,7 +29,7 @@ public interface INiceCiService {
// 기관용 Token // 기관용 Token
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
TokenResponse generateToken(final TokenRequest reqDTO); TokenResponse generateToken(final TokenRequest reqDTO);
TokenResponse revokeToken(); TokenRevokeResponse revokeToken();
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// 기관용 Token // 기관용 Token
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
@ -36,7 +37,7 @@ public interface INiceCiService {
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// 공개키(Publickey) // 공개키(Publickey)
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
PublickeyResponse requestPublickey(final PublickeyRequest reqDTO); PublickeyResponse requestPublickey();
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// 공개키(Publickey) // 공개키(Publickey)
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
@ -44,7 +45,7 @@ public interface INiceCiService {
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// 대칭키 : symmetrickey // 대칭키 : symmetrickey
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
SymmetrickeyRegResponse requestRegSymmetrickey(SymmetrickeyRegRequest reqDTO); SymmetrickeyRegResponse requestRegSymmetrickey();
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// 대칭키 : symmetrickey // 대칭키 : symmetrickey
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------

@ -1,4 +1,4 @@
package kr.xit.ens.support.nice.service; package kr.xit.ens.nice.service;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
@ -13,9 +13,12 @@ import java.util.stream.Collectors;
import javax.validation.ConstraintViolation; import javax.validation.ConstraintViolation;
import javax.validation.Validation; import javax.validation.Validation;
import javax.validation.Validator; import javax.validation.Validator;
import kr.xit.biz.ens.model.nice.NiceCiDTO.CrtfInfo;
import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyReqDataBody;
import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyRequest; import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyRequest;
import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyResDataBody; import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyResDataBody;
import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyResponse; import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyResponse;
import kr.xit.biz.ens.model.nice.NiceCiDTO.RequestDataHeader;
import kr.xit.biz.ens.model.nice.NiceCiDTO.ResponseDataHeader; import kr.xit.biz.ens.model.nice.NiceCiDTO.ResponseDataHeader;
import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRequest; import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRequest;
import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenResDataBody; import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenResDataBody;
@ -25,7 +28,10 @@ import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRevokeResponse;
import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.spring.annotation.TraceLogging; import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.spring.util.ApiWebClientUtil; import kr.xit.core.spring.util.ApiWebClientUtil;
import kr.xit.core.support.utils.DateUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
@ -38,7 +44,7 @@ import org.springframework.util.Base64Utils;
* <pre> * <pre>
* description : * description :
* *
* packageName : kr.xit.ens.support.nice.service * packageName : kr.xit.ens.nice.service
* fileName : NiceCiService * fileName : NiceCiService
* author : limju * author : limju
* date : 2023-09-06 * date : 2023-09-06
@ -50,6 +56,7 @@ import org.springframework.util.Base64Utils;
* </pre> * </pre>
*/ */
//FIXME : client_id, client_secret, access_token DB 처리후 반영 필요 //FIXME : client_id, client_secret, access_token DB 처리후 반영 필요
@Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
@Service @Service
public class NiceCiDummyTestService extends EgovAbstractServiceImpl { public class NiceCiDummyTestService extends EgovAbstractServiceImpl {
@ -73,8 +80,11 @@ public class NiceCiDummyTestService extends EgovAbstractServiceImpl {
@Value("${contract.nice.api.ci}") @Value("${contract.nice.api.ci}")
private String API_CI; private String API_CI;
private final int EXPIRED_CHECK_DAYS = 1;
private static final String AUTH_TYPE_BASIC = "Basic"; private static final String AUTH_TYPE_BASIC = "Basic";
private static final String AUTH_TYPE_BEARER = "bearer"; private static final String AUTH_TYPE_BEARER = "bearer";
private static final String CNTY_CD = "kr";
private static final String PUB_KEY_REQ_TRAN_ID_PREFIX = "TRAN_ID-";
private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator(); private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
private final ApiWebClientUtil webClient; private final ApiWebClientUtil webClient;
@ -91,15 +101,6 @@ public class NiceCiDummyTestService extends EgovAbstractServiceImpl {
@TraceLogging @TraceLogging
public TokenResponse generateToken(final TokenRequest reqDTO){ public TokenResponse generateToken(final TokenRequest reqDTO){
validate(reqDTO); validate(reqDTO);
Map<String,String> map = new HashMap<>();
map.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);
map.put(HttpHeaders.AUTHORIZATION,
String.format("%s %s", AUTH_TYPE_BASIC,
Base64Utils.encodeToString(
Base64Utils.encode(String.format("%s:%s", this.CLIENT_ID, "this.CLIENT_SECRET").getBytes(StandardCharsets.UTF_8))
)
)
);
return TokenResponse.builder() return TokenResponse.builder()
.dataHeader(ResponseDataHeader.builder() .dataHeader(ResponseDataHeader.builder()
@ -147,15 +148,26 @@ public class NiceCiDummyTestService extends EgovAbstractServiceImpl {
// 공개키(Publickey) // 공개키(Publickey)
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
public PublickeyResponse requestPublickey(final PublickeyRequest reqDTO) { public PublickeyResponse requestPublickey() {
validate(reqDTO); final String todayDt = DateUtils.getTodayAndNowTime("yyyyMMddHHmmss");
final PublickeyRequest pubReqDTO = PublickeyRequest.builder()
.dataHeader(RequestDataHeader.builder()
.cntyId(CNTY_CD)
.tranId(String.format("%s%s", PUB_KEY_REQ_TRAN_ID_PREFIX, todayDt))
.build())
.dataBody(PublickeyReqDataBody.builder()
.reqDtim(todayDt)
.build())
.build();
log.debug("{}", pubReqDTO);
validate(pubReqDTO);
return PublickeyResponse.builder() return PublickeyResponse.builder()
.dataHeader(ResponseDataHeader.builder() .dataHeader(ResponseDataHeader.builder()
.gwRsltCd("1200") .gwRsltCd("1200")
.gwRsltMsg("오류없음") .gwRsltMsg("오류없음")
.tranId(reqDTO.getDataHeader().getTranId()) .tranId(pubReqDTO.getDataHeader().getTranId())
.cntyId(reqDTO.getDataHeader().getCntyId()) .cntyId(pubReqDTO.getDataHeader().getCntyId())
.build()) .build())
.dataBody(PublickeyResDataBody.builder() .dataBody(PublickeyResDataBody.builder()
.rspCd("P000") .rspCd("P000")
@ -174,25 +186,6 @@ public class NiceCiDummyTestService extends EgovAbstractServiceImpl {
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
//------------------------------------------------------------------------------- //-------------------------------------------------------------------------------
private Map<String,String> getHeaderMap(final String contentType, final String type){
Map<String,String> map = new HashMap<>();
map.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);
map.put(
HttpHeaders.AUTHORIZATION,
String.format("%s %s",
type,
Base64Utils.encodeToString(
Base64Utils.encode(
String.format("%s:%s:%s",
"accessToken",
(new Date().getTime() / 1000),
this.CLIENT_ID).getBytes(StandardCharsets.UTF_8))
)
)
);
return map;
}
private static <T> void validate(T t) { private static <T> void validate(T t) {
Set<ConstraintViolation<T>> list = validator.validate(t); Set<ConstraintViolation<T>> list = validator.validate(t);
@ -207,4 +200,27 @@ public class NiceCiDummyTestService extends EgovAbstractServiceImpl {
.collect(Collectors.toList()).toString()); .collect(Collectors.toList()).toString());
} }
} }
private CrtfInfo getNiceCrtInfo() {
return CrtfInfo.builder()
.signguCode("11000")
.ffnlgCode("11")
.clientId("6c3eb1ff-530d-458a-9a6e-e02e3346f679")
.clientSecret("960f204ec45bb312b7ad2d6b54b984d9c353b8")
.productId("2101466024")
.accessToken("ff5e27fe-8b5d-49db-ab1e-0ccf07de6ac1")
.expiresIn(1576983050)
.tokenType("bearer")
.scope("default")
.siteCode("AAAA==")
.keyVersion("20210121ca8c1612-2c2d-IPaa-aad1-xxxxxxxxxxxx")
.publicKey("MIIBIjANBgkqhkiG9w0BAQEFAA.....JJxwIDAQAB...")
.validDtim("20220121181550")
.remainingDays(2)
.build();
}
private CrtfInfo getPublickeyCrtInfo(RequestDataHeader reqHeader){
return getNiceCrtInfo();
}
} }

@ -1,9 +1,11 @@
package kr.xit.ens.support.nice.service; package kr.xit.ens.nice.service;
import egovframework.com.cmm.EgovMessageSource;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException; import java.security.InvalidKeyException;
import java.security.KeyFactory; import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
import java.security.spec.InvalidKeySpecException; import java.security.spec.InvalidKeySpecException;
import java.security.spec.X509EncodedKeySpec; import java.security.spec.X509EncodedKeySpec;
import java.util.Base64; import java.util.Base64;
@ -11,7 +13,6 @@ import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Random;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.crypto.BadPaddingException; import javax.crypto.BadPaddingException;
@ -28,17 +29,21 @@ import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyResDataBody;
import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyResponse; import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyResponse;
import kr.xit.biz.ens.model.nice.NiceCiDTO.RequestDataHeader; import kr.xit.biz.ens.model.nice.NiceCiDTO.RequestDataHeader;
import kr.xit.biz.ens.model.nice.NiceCiDTO.ResponseDataHeader; import kr.xit.biz.ens.model.nice.NiceCiDTO.ResponseDataHeader;
import kr.xit.biz.ens.model.nice.NiceCiDTO.SymkeyRegInfo;
import kr.xit.biz.ens.model.nice.NiceCiDTO.SymmetrickeyRegReqDataBody;
import kr.xit.biz.ens.model.nice.NiceCiDTO.SymmetrickeyRegRequest; import kr.xit.biz.ens.model.nice.NiceCiDTO.SymmetrickeyRegRequest;
import kr.xit.biz.ens.model.nice.NiceCiDTO.SymmetrickeyRegResponse; import kr.xit.biz.ens.model.nice.NiceCiDTO.SymmetrickeyRegResponse;
import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRequest; import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRequest;
import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenResponse; import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenResponse;
import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRevokeResponse;
import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.spring.annotation.TraceLogging; import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.spring.util.ApiWebClientUtil; import kr.xit.core.spring.util.ApiWebClientUtil;
import kr.xit.core.support.utils.DateUtils; import kr.xit.core.support.utils.DateUtils;
import kr.xit.core.support.utils.JsonUtils; import kr.xit.core.support.utils.JsonUtils;
import kr.xit.ens.support.cmm.mapper.ICmmEnsMapper; import kr.xit.core.support.utils.UUIDGenerateUtils;
import kr.xit.ens.support.cmm.service.CmmEnsCacheService; import kr.xit.ens.cmm.mapper.ICmmEnsMapper;
import kr.xit.ens.cmm.service.CmmEnsCacheService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
@ -55,7 +60,7 @@ import org.springframework.util.Base64Utils;
* <pre> * <pre>
* description : * description :
* *
* packageName : kr.xit.ens.support.nice.service * packageName : kr.xit.ens.nice.service
* fileName : NiceCiService * fileName : NiceCiService
* author : limju * author : limju
* date : 2023-09-06 * date : 2023-09-06
@ -92,12 +97,15 @@ public class NiceCiService extends EgovAbstractServiceImpl implements INiceCiSer
private String API_CI; private String API_CI;
//FIXME::업무처리 최대 주기 //FIXME::업무처리 최대 주기
private final int EXPIRED_CHECK_DAYS = 1; private final int EXPIRED_CHECK_DAYS = 0;
private static final String AUTH_TYPE_BASIC = "Basic"; private static final String AUTH_TYPE_BASIC = "Basic";
private static final String AUTH_TYPE_BEARER = "bearer"; private static final String AUTH_TYPE_BEARER = "bearer";
private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator(); private static final String CNTY_CD = "kr";
private static final String TRAN_ID_PREFIX = "TRAN_ID-";
private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
private final EgovMessageSource messageSource;
private final ApiWebClientUtil webClient; private final ApiWebClientUtil webClient;
private final CmmEnsCacheService cacheService; private final CmmEnsCacheService cacheService;
private final ICmmEnsMapper cmmEnsMapper; private final ICmmEnsMapper cmmEnsMapper;
@ -117,10 +125,12 @@ public class NiceCiService extends EgovAbstractServiceImpl implements INiceCiSer
public TokenResponse generateToken(final TokenRequest reqDTO){ public TokenResponse generateToken(final TokenRequest reqDTO){
validate(reqDTO); validate(reqDTO);
CrtfInfo niceDTO = getNiceCrtInfo();
Map<String,String> map = new HashMap<>(); Map<String,String> map = new HashMap<>();
map.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE); map.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);
map.put(HttpHeaders.AUTHORIZATION, map.put(HttpHeaders.AUTHORIZATION,
String.format("%s %s", AUTH_TYPE_BASIC, Base64Utils.encodeToString(Base64Utils.encode(String.format("%s:%s", this.CLIENT_ID, "this.CLIENT_SECRET").getBytes(StandardCharsets.UTF_8))))); String.format("%s %s", AUTH_TYPE_BASIC, Base64Utils.encodeToString(Base64Utils.encode(String.format("%s:%s", CLIENT_ID, niceDTO.getClientSecret()).getBytes(StandardCharsets.UTF_8)))));
return webClient.exchange(HOST + API_GENERATE_TOKEN, HttpMethod.POST, JsonUtils.toJson(reqDTO), TokenResponse.class, map); return webClient.exchange(HOST + API_GENERATE_TOKEN, HttpMethod.POST, JsonUtils.toJson(reqDTO), TokenResponse.class, map);
} }
@ -138,15 +148,15 @@ public class NiceCiService extends EgovAbstractServiceImpl implements INiceCiSer
*/ */
@Override @Override
@TraceLogging @TraceLogging
public TokenResponse revokeToken(){ public TokenRevokeResponse revokeToken(){
//validate(reqDTO, null); CrtfInfo niceDTO = getNiceCrtInfo();
return webClient.exchange( return webClient.exchange(
HOST + API_GENERATE_TOKEN, HOST + API_GENERATE_TOKEN,
HttpMethod.POST, HttpMethod.POST,
null, null,
TokenResponse.class, TokenRevokeResponse.class,
getHeaderMap(MediaType.APPLICATION_FORM_URLENCODED_VALUE, AUTH_TYPE_BASIC)); getHeaderMap(MediaType.APPLICATION_FORM_URLENCODED_VALUE, AUTH_TYPE_BASIC, niceDTO.getAccessToken()));
} }
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// 기관용 Token // 기관용 Token
@ -158,15 +168,27 @@ public class NiceCiService extends EgovAbstractServiceImpl implements INiceCiSer
@Override @Override
@TraceLogging @TraceLogging
public PublickeyResponse requestPublickey(final PublickeyRequest reqDTO) { public PublickeyResponse requestPublickey() {
validate(reqDTO); CrtfInfo niceDTO = getNiceCrtInfo();
final String todayDt = DateUtils.getTodayAndNowTime("yyyyMMddHHmmss");
final PublickeyRequest pubReqDTO = PublickeyRequest.builder()
.dataHeader(RequestDataHeader.builder()
.cntyId(CNTY_CD)
.tranId(String.format("%s%s", TRAN_ID_PREFIX, todayDt))
.build())
.dataBody(PublickeyReqDataBody.builder()
.reqDtim(todayDt)
.build())
.build();
validate(pubReqDTO);
return webClient.exchange( return webClient.exchange(
HOST + API_GENERATE_TOKEN, HOST + API_GENERATE_TOKEN,
HttpMethod.POST, HttpMethod.POST,
null, null,
PublickeyResponse.class, PublickeyResponse.class,
getHeaderMap(MediaType.APPLICATION_JSON_VALUE, AUTH_TYPE_BEARER)); getHeaderMap(MediaType.APPLICATION_JSON_VALUE, AUTH_TYPE_BEARER, niceDTO.getAccessToken()));
} }
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
@ -188,49 +210,91 @@ public class NiceCiService extends EgovAbstractServiceImpl implements INiceCiSer
* </pre> * </pre>
*/ */
@Override @Override
public SymmetrickeyRegResponse requestRegSymmetrickey(SymmetrickeyRegRequest reqDTO) { public SymmetrickeyRegResponse requestRegSymmetrickey() {
//FIXME::NICE 연계이후 메소드 교체
//CrtfInfo niceDTO = getPublickeyCrtInfo();
CrtfInfo niceDTO = getNiceCrtInfo();
SymkeyRegInfo symkeyRegInfo = getSymkeyRegInfo(niceDTO);
//FIXME::NICE 연계이후 comment 제거
//String encSymkeyRegInfo = encodeString(niceDTO.getPublicKey(), JsonUtils.toJson(symkeyRegInfo));
String encSymkeyRegInfo = "encodeStringniceDTOgetPublicKeyJsonUtilstoJsonsymkeyRegInfo";
final String todayDt = DateUtils.getTodayAndNowTime("yyyyMMddHHmmss");
SymmetrickeyRegRequest reqDTO = SymmetrickeyRegRequest.builder()
.dataHeader(RequestDataHeader.builder()
.cntyId(CNTY_CD)
.tranId(TRAN_ID_PREFIX + todayDt)
.build())
.dataBody(SymmetrickeyRegReqDataBody.builder()
.pubkeyVersion(niceDTO.getKeyVersion())
.symkeyRegInfo(encSymkeyRegInfo)
.build())
.build();
validate(reqDTO); validate(reqDTO);
Map<String,String> headerMap = getHeaderMap(MediaType.APPLICATION_JSON_VALUE, AUTH_TYPE_BEARER, niceDTO.getAccessToken());
headerMap.put("ProductID", niceDTO.getProductId());
CrtfInfo crtfInfo = getNiceCrtInfo(reqDTO.getDataHeader()); return webClient.exchange(
HOST + API_SYMMETRICKEY,
HttpMethod.POST,
reqDTO,
SymmetrickeyRegResponse.class,
headerMap);
}
//--------------------------------------------------------------------------------
// 대칭키 : symmetrickey
//--------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
/**
* Nice
* @return
*/
private CrtfInfo getNiceCrtInfo() {
CrtfInfo crtfInfo = cacheService.getNiceCrtfInfoCache(SIGNGU_CODE, FFNLG_CODE, CLIENT_ID);
if(ObjectUtils.isEmpty(crtfInfo)) throw BizRuntimeException.create(messageSource.getMessage("fail.api.nice.crtfInfo"));
cacheService.logCache();
return null; return crtfInfo;
} }
/** /**
* <pre> * <pre>
*
* 0. cache call * 0. cache call
* --> 5 * -->
* 1. update * 1.
* 2. cache && cache call * 2.
* @param reqHeader RequestDataHeader * 3. update
* 4. cache && cache reload
* @return * @return
* </pre> * </pre>
*/ */
private CrtfInfo getNiceCrtInfo(RequestDataHeader reqHeader) { private CrtfInfo getPublickeyCrtInfo() {
CrtfInfo crtfInfo = cacheService.getNiceCrtfInfoCache(SIGNGU_CODE, FFNLG_CODE, CLIENT_ID); CrtfInfo crtfInfo = getNiceCrtInfo();
cacheService.logCache();
if(crtfInfo.getRemainingDays() > EXPIRED_CHECK_DAYS) return crtfInfo; if(crtfInfo.getRemainingDays() > EXPIRED_CHECK_DAYS) return crtfInfo;
//FIXME::공개키 발급요청 call // 1. 토큰 폐기
PublickeyRequest pubReqDTO = PublickeyRequest.builder() TokenRevokeResponse revokeResDTO = revokeToken();
.dataHeader(reqHeader) if(!(revokeResDTO.getDataHeader().getGwRsltCd().equals("1200") && revokeResDTO.getDataBody().isResult())){
.dataBody(PublickeyReqDataBody.builder() throw BizRuntimeException.create(messageSource.getMessage("fail.api.nice.revoke.token"));
.reqDtim(DateUtils.getTodayAndNowTime("yyyyMMddHHmmss")) }
.build())
.build();
PublickeyResponse pubResDTO = requestPublickey(pubReqDTO); // 2. 공개키 발급 요청
//PublickeyResponse pubResDTO = JsonUtils.toObject(pubResJson, PublickeyResponse.class); PublickeyResponse pubResDTO = requestPublickey();
//FIXME::공개키 정보 갱신 //FIXME::공개키 정보 갱신 - Error code enum 전환
ResponseDataHeader dataHeader = pubResDTO.getDataHeader(); ResponseDataHeader dataHeader = pubResDTO.getDataHeader();
PublickeyResDataBody dataBody = pubResDTO.getDataBody(); PublickeyResDataBody dataBody = pubResDTO.getDataBody();
// 3. 공개키 정보 update
if(dataHeader.getGwRsltCd().equals("1200") if(dataHeader.getGwRsltCd().equals("1200")
&& dataBody.getRspCd().equals("P000") && dataBody.getRspCd().equals("P000")
&& dataBody.getResultCd().equals("0000")){ && dataBody.getResultCd().equals("0000")){
@ -244,16 +308,29 @@ public class NiceCiService extends EgovAbstractServiceImpl implements INiceCiSer
throw BizRuntimeException.create(JsonUtils.toJson(dataHeader)); throw BizRuntimeException.create(JsonUtils.toJson(dataHeader));
} }
// 4. cache 삭제 && cache reload
cacheService.removeNiceCrtfInfoCache(SIGNGU_CODE, FFNLG_CODE, CLIENT_ID); cacheService.removeNiceCrtfInfoCache(SIGNGU_CODE, FFNLG_CODE, CLIENT_ID);
return cacheService.getNiceCrtfInfoCache(SIGNGU_CODE, FFNLG_CODE, CLIENT_ID); return cacheService.getNiceCrtfInfoCache(SIGNGU_CODE, FFNLG_CODE, CLIENT_ID);
} }
//-------------------------------------------------------------------------------- /**
// 대칭키 : symmetrickey * <pre>
//-------------------------------------------------------------------------------- * (symmetrickey) symkey_reg_info JSON
* @param crtfInfo
* @return
* </pre>
*/
private SymkeyRegInfo getSymkeyRegInfo(CrtfInfo crtfInfo) {
return SymkeyRegInfo.builder()
.siteCode(crtfInfo.getSiteCode())
.requestNo(UUIDGenerateUtils.generateLengthUuid(30))
.key(UUIDGenerateUtils.generateLengthUuid(32))
.iv(UUIDGenerateUtils.generateLengthUuid(16))
.hmacKey(UUIDGenerateUtils.generateLengthUuid(32))
.build();
}
//------------------------------------------------------------------------------- private Map<String,String> getHeaderMap(final String contentType, final String type, final String accessToken){
private Map<String,String> getHeaderMap(final String contentType, final String type){
Map<String,String> map = new HashMap<>(); Map<String,String> map = new HashMap<>();
if(ObjectUtils.isNotEmpty(contentType)) map.put(HttpHeaders.CONTENT_TYPE, contentType); if(ObjectUtils.isNotEmpty(contentType)) map.put(HttpHeaders.CONTENT_TYPE, contentType);
map.put( map.put(
@ -263,7 +340,7 @@ public class NiceCiService extends EgovAbstractServiceImpl implements INiceCiSer
Base64Utils.encodeToString( Base64Utils.encodeToString(
Base64Utils.encode( Base64Utils.encode(
String.format("%s:%s:%s", String.format("%s:%s:%s",
"accessToken", accessToken,
(new Date().getTime() / 1000), (new Date().getTime() / 1000),
this.CLIENT_ID).getBytes(StandardCharsets.UTF_8)) this.CLIENT_ID).getBytes(StandardCharsets.UTF_8))
) )
@ -295,13 +372,12 @@ public class NiceCiService extends EgovAbstractServiceImpl implements INiceCiSer
* @param planText * @param planText
* @return * @return
*/ */
protected final String encodeString(final String strPublicKey, final String planText) { //throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException { private String encodeString(final String strPublicKey, String planText) { //throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
try { try {
KeyFactory keyFactory = KeyFactory.getInstance("RSA"); KeyFactory keyFactory = KeyFactory.getInstance("RSA");
byte[] cipherEnc = Base64.getDecoder().decode(strPublicKey); byte[] cipherEnc = Base64.getDecoder().decode(strPublicKey);
X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(cipherEnc); X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(cipherEnc);
java.security.PublicKey publicKey = keyFactory.generatePublic(publicKeySpec); PublicKey publicKey = keyFactory.generatePublic(publicKeySpec);
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
cipher.init(Cipher.ENCRYPT_MODE, publicKey); cipher.init(Cipher.ENCRYPT_MODE, publicKey);
@ -317,16 +393,21 @@ public class NiceCiService extends EgovAbstractServiceImpl implements INiceCiSer
} }
} }
protected final String randomAlphaWord(int wordLength) { // private String encodeString2(final String strPublicKey, final String planText) { //throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
Random r = new Random(); //
// try {
StringBuilder sb = new StringBuilder(wordLength); // PublicKey publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAJJxwIDAQAB";
for (int i = 0; i < wordLength; i++) { // Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
char tmp = (char) ('a' + r.nextInt('z' - 'a')); // cipher.init(Cipher.ENCRYPT_MODE, publicKey);
sb.append(tmp); // byte[] bytePlain = cipher.doFinal(planText.getBytes());
// return Base64Utils.encodeToString(bytePlain);
} //
return sb.toString(); // } catch (NoSuchAlgorithmException|InvalidKeySpecException|NoSuchPaddingException|InvalidKeyException e){
// throw BizRuntimeException.create(e.getMessage());
} // } catch (IllegalBlockSizeException e) {
// throw BizRuntimeException.create(e.getMessage());
// } catch (BadPaddingException e) {
// throw BizRuntimeException.create(e.getMessage());
// }
// }
} }

@ -1,14 +1,10 @@
package kr.xit.ens.support.nice.web; package kr.xit.ens.nice.web;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyRequest;
import kr.xit.biz.ens.model.nice.NiceCiDTO.SymmetrickeyRegRequest;
import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRequest; import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRequest;
import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.model.ApiResponseDTO;
import kr.xit.ens.support.nice.service.INiceCiService; import kr.xit.ens.nice.service.INiceCiService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
@ -20,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
* <pre> * <pre>
* description : * description :
* *
* packageName : kr.xit.ens.support.nice.web * packageName : kr.xit.ens.nice.web
* fileName : NiceCiController * fileName : NiceCiController
* author : limju * author : limju
* date : 2023-09-06 * date : 2023-09-06
@ -34,7 +30,7 @@ import org.springframework.web.bind.annotation.RestController;
@Tag(name = "NiceCiController", description = "Nice CI API") @Tag(name = "NiceCiController", description = "Nice CI API")
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController
@RequestMapping(value = "/api/nice/v1") @RequestMapping(value = "/api/ens/nice/v1")
public class NiceCiController { public class NiceCiController {
private final INiceCiService service; private final INiceCiService service;
@ -70,9 +66,9 @@ public class NiceCiController {
@Operation(summary = "공개키 요청", description = "공개키 요청") @Operation(summary = "공개키 요청", description = "공개키 요청")
@PostMapping(value = "/requestPublickey", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/requestPublickey", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> requestPublickey( public ApiResponseDTO<?> requestPublickey(
@RequestBody final PublickeyRequest reqDTO //@RequestBody final PublickeyRequest reqDTO
) { ) {
return ApiResponseDTO.success(service.requestPublickey(reqDTO)); return ApiResponseDTO.success(service.requestPublickey());
} }
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// 공개키(Publickey) // 공개키(Publickey)
@ -84,9 +80,9 @@ public class NiceCiController {
@Operation(summary = "대칭키(symmetrickey) 등록 요청", description = "대칭키(symmetrickey) 등록 요청") @Operation(summary = "대칭키(symmetrickey) 등록 요청", description = "대칭키(symmetrickey) 등록 요청")
@PostMapping(value = "/requestRegSymmetrickey", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/requestRegSymmetrickey", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> requestRegSymmetrickey( public ApiResponseDTO<?> requestRegSymmetrickey(
@RequestBody final SymmetrickeyRegRequest reqDTO final String requestNo
) { ) {
return ApiResponseDTO.success(service.requestRegSymmetrickey(reqDTO)); return ApiResponseDTO.success(service.requestRegSymmetrickey());
} }
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------

@ -1,27 +1,12 @@
package kr.xit.ens.support.nice.web; package kr.xit.ens.nice.web;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import javax.validation.ConstraintViolation;
import javax.validation.Validation; import javax.validation.Validation;
import javax.validation.Validator; import javax.validation.Validator;
import kr.xit.biz.ens.model.nice.NiceCiDTO.PublickeyRequest;
import kr.xit.biz.ens.model.nice.NiceCiDTO.ResponseDataHeader;
import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRequest; import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRequest;
import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenResDataBody;
import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenResponse;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.spring.annotation.TraceLogging; import kr.xit.ens.nice.service.NiceCiDummyTestService;
import kr.xit.core.support.utils.JsonUtils;
import kr.xit.ens.support.nice.service.INiceCiService;
import kr.xit.ens.support.nice.service.NiceCiDummyTestService;
import kr.xit.ens.support.nice.service.NiceCiService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
@ -36,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
* <pre> * <pre>
* description : * description :
* *
* packageName : kr.xit.ens.support.nice.web * packageName : kr.xit.ens.nice.web
* fileName : NiceCiDummyTestController * fileName : NiceCiDummyTestController
* author : limju * author : limju
* date : 2023-09-06 * date : 2023-09-06
@ -51,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
@Tag(name = "NiceCiDummyTestController", description = "Nice CI Dummy Test") @Tag(name = "NiceCiDummyTestController", description = "Nice CI Dummy Test")
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController
@RequestMapping(value = "/api/nice/test") @RequestMapping(value = "/api/ens/nice/test")
public class NiceCiDummyTestController { public class NiceCiDummyTestController {
private final NiceCiDummyTestService service; private final NiceCiDummyTestService service;
private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator(); private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
@ -97,9 +82,9 @@ public class NiceCiDummyTestController {
@Operation(summary = "공개키 요청", description = "공개키 요청") @Operation(summary = "공개키 요청", description = "공개키 요청")
@PostMapping(value = "/requestPublickey", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/requestPublickey", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> requestPublickey( public ApiResponseDTO<?> requestPublickey(
@RequestBody final PublickeyRequest reqDTO //@RequestBody final PublickeyRequest reqDTO
) { ) {
return ApiResponseDTO.success(service.requestPublickey(reqDTO)); return ApiResponseDTO.success(service.requestPublickey());
} }
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------

@ -14,7 +14,6 @@ contract:
kakao: kakao:
bulk-max-cnt: 10 bulk-max-cnt: 10
host: https://docs-gw.kakaopay.com host: https://docs-gw.kakaopay.com
#host: https://dummy.restapiexample.com
token: dd394da7f66211eb9cbe46e139ceffc2 token: dd394da7f66211eb9cbe46e139ceffc2
uuid: CON-41ef0535f67211ebbdedd2e6ed332381 uuid: CON-41ef0535f67211ebbdedd2e6ed332381
api: api:
@ -25,7 +24,6 @@ contract:
bulksend: /v1/documents/bulk;POST bulksend: /v1/documents/bulk;POST
bulkstatus: /v1/documents/bulk/status;POST bulkstatus: /v1/documents/bulk/status;POST
nice: nice:
#host: http://parking.cheonan.go.kr
host: https://svc.niceapi.co.kr:22001 host: https://svc.niceapi.co.kr:22001
signgu-code: 11000 signgu-code: 11000
ffnlg-code: 11 ffnlg-code: 11

Loading…
Cancel
Save