feat: post plus detail json data 암호화 적용

dev
gitea-관리자 1 year ago
parent f50c492b7a
commit 349429e916

@ -22,6 +22,7 @@ import kr.xit.ens.pplus.mapper.IPplusMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.jasypt.encryption.StringEncryptor;
import org.json.simple.JSONObject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
@ -61,6 +62,7 @@ public class PplusService extends EgovAbstractServiceImpl implements IPplusServi
@Value("${app.contract.pplus.api.status}")
private String STATUS;
private final StringEncryptor jasyptStringEncryptor;
private final ApiWebClientUtil webClient;
private final IPplusMapper mapper;
@ -78,7 +80,7 @@ public class PplusService extends EgovAbstractServiceImpl implements IPplusServi
JSONObject detail = new JSONObject();
detail.put("cols", JsonUtils.toObject(tgtList.get(0).getDetailCols(), ArrayList.class));
detail.put("rows", tgtList.stream()
.map(BatchAcceptRequest::getDetailRows)
.map(d -> jasyptStringEncryptor.decrypt(d.getDetailRows()))
.map(d -> JsonUtils.toObject(d, ArrayList.class))
.toList());

@ -1,6 +1,5 @@
package kr.xit.core.spring.config;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;

Loading…
Cancel
Save