From f50c492b7a720b30255c8f473fa5d16d87a40749 Mon Sep 17 00:00:00 2001 From: limju Date: Tue, 14 Nov 2023 14:06:30 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20batch=20https=20=EC=A0=81=EC=9A=A9?= =?UTF-8?q?=20=20=20=20=20=20=20profile=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/config/application-prod.yml | 2 +- .../src/main/resources/config/application.yml | 22 +++++++++--------- .../main/resources/config/application-dev.yml | 5 +++- .../resources/config/application-local.yml | 3 +++ .../resources/config/application-prod.yml | 5 +++- .../src/main/resources/config/application.yml | 23 ++++++++++--------- 6 files changed, 35 insertions(+), 25 deletions(-) diff --git a/mens-api/src/main/resources/config/application-prod.yml b/mens-api/src/main/resources/config/application-prod.yml index cb2d9cc..f67b623 100644 --- a/mens-api/src/main/resources/config/application-prod.yml +++ b/mens-api/src/main/resources/config/application-prod.yml @@ -1,5 +1,5 @@ #----------------------------------------------------------------------- -# local 설정 +# prod 설정 #----------------------------------------------------------------------- spring: datasource: diff --git a/mens-api/src/main/resources/config/application.yml b/mens-api/src/main/resources/config/application.yml index 67b9cdf..481c748 100644 --- a/mens-api/src/main/resources/config/application.yml +++ b/mens-api/src/main/resources/config/application.yml @@ -64,7 +64,7 @@ spring: datasource: #type: com.zaxxer.hikari.HikariDataSource hikari: - maria: + primary: pool-name: xit-maria-pool auto-commit: false # 인프라의 적용된 connection time limit보다 작아야함 @@ -75,16 +75,16 @@ spring: data-source-properties: rewriteBatchedStatements: true - oracle: - pool-name: xit-oracle-pool - auto-commit: false - # 인프라의 적용된 connection time limit보다 작아야함 - max-lifetime: 1800000 - maximum-pool-size: 15 - minimum-idle: 5 -# transaction-isolation: TRANSACTION_READ_UNCOMMITTED - data-source-properties: - rewriteBatchedStatements: true +# secondary: +# pool-name: xit-oracle-pool +# auto-commit: false +# # 인프라의 적용된 connection time limit보다 작아야함 +# max-lifetime: 1800000 +# maximum-pool-size: 15 +# minimum-idle: 5 +## transaction-isolation: TRANSACTION_READ_UNCOMMITTED +# data-source-properties: +# rewriteBatchedStatements: true logging: level: diff --git a/mens-batch/src/main/resources/config/application-dev.yml b/mens-batch/src/main/resources/config/application-dev.yml index 07b73ad..fb1f8ca 100644 --- a/mens-batch/src/main/resources/config/application-dev.yml +++ b/mens-batch/src/main/resources/config/application-dev.yml @@ -1,6 +1,9 @@ #----------------------------------------------------------------------- -# local 설정 +# dev 설정 #----------------------------------------------------------------------- +server: + port: 9443 + http: 8082 spring: datasource: # =============== p6spy =============================== diff --git a/mens-batch/src/main/resources/config/application-local.yml b/mens-batch/src/main/resources/config/application-local.yml index 51ecde6..e9ed7ab 100644 --- a/mens-batch/src/main/resources/config/application-local.yml +++ b/mens-batch/src/main/resources/config/application-local.yml @@ -1,6 +1,9 @@ #----------------------------------------------------------------------- # local 설정 #----------------------------------------------------------------------- +server: + port: 9443 + http: 8082 spring: datasource: # =============== p6spy =============================== diff --git a/mens-batch/src/main/resources/config/application-prod.yml b/mens-batch/src/main/resources/config/application-prod.yml index ffaf5b1..641c066 100644 --- a/mens-batch/src/main/resources/config/application-prod.yml +++ b/mens-batch/src/main/resources/config/application-prod.yml @@ -1,6 +1,9 @@ #----------------------------------------------------------------------- -# local 설정 +# prod 설정 #----------------------------------------------------------------------- +server: + port: 9443 + http: 8082 spring: datasource: #username: root diff --git a/mens-batch/src/main/resources/config/application.yml b/mens-batch/src/main/resources/config/application.yml index ed47f45..5658d83 100644 --- a/mens-batch/src/main/resources/config/application.yml +++ b/mens-batch/src/main/resources/config/application.yml @@ -43,6 +43,7 @@ spring: # core의 application-common.yml과 application-auth.yml include include: + - https - common - auth - app @@ -63,7 +64,7 @@ spring: datasource: #type: com.zaxxer.hikari.HikariDataSource hikari: - maria: + primary: pool-name: xit-maria-pool auto-commit: false # 인프라의 적용된 connection time limit보다 작아야함 @@ -74,16 +75,16 @@ spring: data-source-properties: rewriteBatchedStatements: true - oracle: - pool-name: xit-oracle-pool - auto-commit: false - # 인프라의 적용된 connection time limit보다 작아야함 - max-lifetime: 1800000 - maximum-pool-size: 10 - minimum-idle: 5 -# transaction-isolation: TRANSACTION_READ_UNCOMMITTED - data-source-properties: - rewriteBatchedStatements: true +# secondary: +# pool-name: xit-oracle-pool +# auto-commit: false +# # 인프라의 적용된 connection time limit보다 작아야함 +# max-lifetime: 1800000 +# maximum-pool-size: 10 +# minimum-idle: 5 +## transaction-isolation: TRANSACTION_READ_UNCOMMITTED +# data-source-properties: +# rewriteBatchedStatements: true logging: level: From 349429e916741071276a4bbc8a7a42af04caf884 Mon Sep 17 00:00:00 2001 From: limju Date: Tue, 14 Nov 2023 17:01:54 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20post=20plus=20detail=20json=20data?= =?UTF-8?q?=20=EC=95=94=ED=98=B8=ED=99=94=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/kr/xit/ens/pplus/service/PplusService.java | 4 +++- .../src/main/java/kr/xit/core/spring/config/JasyptConfig.java | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java b/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java index e4a981c..2338ca7 100644 --- a/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java +++ b/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java @@ -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()); diff --git a/mens-core/src/main/java/kr/xit/core/spring/config/JasyptConfig.java b/mens-core/src/main/java/kr/xit/core/spring/config/JasyptConfig.java index 4ffd26e..1273679 100644 --- a/mens-core/src/main/java/kr/xit/core/spring/config/JasyptConfig.java +++ b/mens-core/src/main/java/kr/xit/core/spring/config/JasyptConfig.java @@ -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; From b62f02d438cf2ced574e751323a3bdd9456c0b12 Mon Sep 17 00:00:00 2001 From: limju Date: Tue, 14 Nov 2023 17:04:32 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20batch=20https=20=EC=A0=81=EC=9A=A9?= =?UTF-8?q?=20=20=20=20=20=20=20profile=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/kr/xit/biz/sisul/service/BizSisulService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mens-api/src/main/java/kr/xit/biz/sisul/service/BizSisulService.java b/mens-api/src/main/java/kr/xit/biz/sisul/service/BizSisulService.java index aa17445..55277db 100644 --- a/mens-api/src/main/java/kr/xit/biz/sisul/service/BizSisulService.java +++ b/mens-api/src/main/java/kr/xit/biz/sisul/service/BizSisulService.java @@ -41,6 +41,7 @@ import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; +import org.jasypt.encryption.StringEncryptor; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.springframework.stereotype.Service; @@ -70,6 +71,7 @@ public class BizSisulService extends EgovAbstractServiceImpl implements IBizSisu private final static int FMC_EXCEL_CELL_CNT = 58; private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator(); + private final StringEncryptor jasyptStringEncryptor; private final INiceCiService niceCiService; private final IBizSisulMapper mapper; @@ -350,7 +352,7 @@ public class BizSisulService extends EgovAbstractServiceImpl implements IBizSisu .masterCols(ppMasterJson[0]) .masterRows(ppMasterJson[1]) .detailCols(ppDetailJson[0]) - .detailRows(ppDetailJson[1]) + .detailRows(jasyptStringEncryptor.encrypt(ppDetailJson[1])) .register(register) .build() ); @@ -1051,7 +1053,7 @@ public class BizSisulService extends EgovAbstractServiceImpl implements IBizSisu details.add(getElementsObj( "", "PRE_TEXT", - " \\n※ 해당 고지서에 대한 연체료(공유재산법 의거 연7%~15%)는 최종 납부 이후 일할 정산하여 별도 고지서로 부과됩니다." + " \\n\u203B 해당 고지서에 대한 연체료(공유재산법 의거 연7%~15%)는 최종 납부 이후 일할 정산하여 별도 고지서로 부과됩니다." )); els = new JSONArray(); @@ -1081,7 +1083,7 @@ public class BizSisulService extends EgovAbstractServiceImpl implements IBizSisu details.add(getElementsObj( "", "PRE_TEXT", - " \\n※ 2022.04.19.까지 연체료율 10%~15%\\n※ 체납 시 보중보험 청구, 재산 압류, 사용료 청구소송 등 조치가 이루어지며, 금융기관 및 신용정보기관에 연체정보가 등록되어 금융거래 등 각종 경제활동에 불이익이 있을 수 있습니다." + " \\n\u203B 2022.04.19.까지 연체료율 10%~15%\\n\u203B 체납 시 보중보험 청구, 재산 압류, 사용료 청구소송 등 조치가 이루어지며, 금융기관 및 신용정보기관에 연체정보가 등록되어 금융거래 등 각종 경제활동에 불이익이 있을 수 있습니다." )); JSONObject json = new JSONObject();