diff --git a/mens-api/lib/VNOInterop.jar b/mens-api/lib/VNOInterop.jar new file mode 100644 index 0000000..d46f04b Binary files /dev/null and b/mens-api/lib/VNOInterop.jar differ diff --git a/mens-api/src/main/java/kr/xit/biz/sisul/mapper/IBizSisulMapper.java b/mens-api/src/main/java/kr/xit/biz/chuncheon/mapper/IBizChuncheonMapper.java similarity index 68% rename from mens-api/src/main/java/kr/xit/biz/sisul/mapper/IBizSisulMapper.java rename to mens-api/src/main/java/kr/xit/biz/chuncheon/mapper/IBizChuncheonMapper.java index 4755dc6..fce1b9e 100644 --- a/mens-api/src/main/java/kr/xit/biz/sisul/mapper/IBizSisulMapper.java +++ b/mens-api/src/main/java/kr/xit/biz/chuncheon/mapper/IBizChuncheonMapper.java @@ -1,15 +1,16 @@ -package kr.xit.biz.sisul.mapper; +package kr.xit.biz.chuncheon.mapper; import java.util.List; import java.util.Optional; + +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; +import org.springframework.context.annotation.Conditional; + +import kr.xit.biz.chuncheon.model.ChuncheonSndngResultDTO; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO; import kr.xit.biz.ens.model.cmm.TmplatManage; import kr.xit.biz.ens.model.cntc.CntcDTO; -import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulRequest; -import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResDtlData; -import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResMstData; -import kr.xit.other.model.ElecnoticeDTO.Elecnoticedtl; -import org.egovframe.rte.psl.dataaccess.mapper.Mapper; +import kr.xit.core.spring.config.support.ProfileConditionOfChuncheon; /** *
@@ -27,16 +28,16 @@ import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
  * 
*/ @Mapper -public interface IBizSisulMapper { +@Conditional(ProfileConditionOfChuncheon.class) +public interface IBizChuncheonMapper { Optional selectDeptInfoByTmplId(final String tmplatId); int insertCntcSndngMst(CntcDTO.SndngMst dto); int insertCntcSndngDtl(CntcDTO.SndngDtl dto); int insertCi(CmmEnsFileInfDTO.FmcInfExcelRslt dto); int insertPostPlusJson(CntcDTO.PostPlusJson dto); - Optional selectSndngResultMaster(final RsltSisulRequest dto); - List selectSndngResultDetails(final RsltSisulRequest dto); - List selectOhterResult(); + Optional selectSndngResultMaster(final ChuncheonSndngResultDTO.RsltChuncheonRequest dto); + List selectSndngResultDetails(final ChuncheonSndngResultDTO.RsltChuncheonRequest dto); Optional selectCntcMst(final CntcDTO.SndngMst dto); diff --git a/mens-api/src/main/java/kr/xit/biz/sisul/model/SisulSndngResultDTO.java b/mens-api/src/main/java/kr/xit/biz/chuncheon/model/ChuncheonSndngResultDTO.java similarity index 86% rename from mens-api/src/main/java/kr/xit/biz/sisul/model/SisulSndngResultDTO.java rename to mens-api/src/main/java/kr/xit/biz/chuncheon/model/ChuncheonSndngResultDTO.java index 3fdbf57..07c0ac0 100644 --- a/mens-api/src/main/java/kr/xit/biz/sisul/model/SisulSndngResultDTO.java +++ b/mens-api/src/main/java/kr/xit/biz/chuncheon/model/ChuncheonSndngResultDTO.java @@ -1,9 +1,11 @@ -package kr.xit.biz.sisul.model; +package kr.xit.biz.chuncheon.model; + +import javax.validation.constraints.Size; import com.fasterxml.jackson.annotation.JsonProperty; + import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema.RequiredMode; -import javax.validation.constraints.Size; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -25,14 +27,14 @@ import lombok.NoArgsConstructor; * * */ -public class SisulSndngResultDTO { +public class ChuncheonSndngResultDTO { - @Schema(name = "RsltSisulRequest", description = "발송결과정보 조회 request DTO") + @Schema(name = "RsltChuncheonRequest", description = "발송결과정보 조회 request DTO") @Data @NoArgsConstructor @AllArgsConstructor @Builder - public static class RsltSisulRequest { + public static class RsltChuncheonRequest { /** * 통합발송마스터 ID - 파일유일키 */ @@ -48,12 +50,12 @@ public class SisulSndngResultDTO { private String unitySndngDetailId; } - @Schema(name = "RsltSisulResMstData", description = "발송결과정보 master 조회 response DTO") + @Schema(name = "RsltChuncheonResMstData", description = "발송결과정보 master 조회 response DTO") @Getter @NoArgsConstructor @AllArgsConstructor @Builder - public static class RsltSisulResMstData { + public static class RsltChuncheonResMstData { /** * 통합발송마스터 ID - 파일유일키 @@ -86,12 +88,12 @@ public class SisulSndngResultDTO { private String sndngDt; } - @Schema(name = "RsltSisulResDtlData", description = "발송결과정보 details 조회 response DTO") + @Schema(name = "RsltChuncheonResDtlData", description = "발송결과정보 details 조회 response DTO") @Getter @NoArgsConstructor @AllArgsConstructor @Builder - public static class RsltSisulResDtlData { + public static class RsltChuncheonResDtlData { /** * 통합발송마스터 ID - 파일유일키 */ diff --git a/mens-api/src/main/java/kr/xit/biz/sisul/service/BizSisulService.java b/mens-api/src/main/java/kr/xit/biz/chuncheon/service/BizChuncheonService.java similarity index 98% rename from mens-api/src/main/java/kr/xit/biz/sisul/service/BizSisulService.java rename to mens-api/src/main/java/kr/xit/biz/chuncheon/service/BizChuncheonService.java index 6999239..da2bf1d 100644 --- a/mens-api/src/main/java/kr/xit/biz/sisul/service/BizSisulService.java +++ b/mens-api/src/main/java/kr/xit/biz/chuncheon/service/BizChuncheonService.java @@ -1,11 +1,9 @@ -package kr.xit.biz.sisul.service; +package kr.xit.biz.chuncheon.service; -import static egovframework.com.cmm.util.EgovDateUtil.formatDate; +import static egovframework.com.cmm.util.EgovDateUtil.*; import java.io.IOException; import java.io.InputStream; -import java.text.DateFormat; -import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; @@ -16,9 +14,27 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; import java.util.regex.Pattern; import java.util.stream.Collectors; + import javax.validation.ConstraintViolation; import javax.validation.Validation; import javax.validation.Validator; + +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellType; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.jasypt.encryption.StringEncryptor; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.springframework.context.annotation.Conditional; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; + +import kr.xit.biz.chuncheon.mapper.IBizChuncheonMapper; +import kr.xit.biz.chuncheon.model.ChuncheonSndngResultDTO; import kr.xit.biz.common.ApiConstants; import kr.xit.biz.common.ApiConstants.NiceCiWrkDiv; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload; @@ -29,12 +45,9 @@ import kr.xit.biz.ens.model.cntc.CntcDTO; import kr.xit.biz.ens.model.nice.NiceCiDTO.IpinCiResDataBody; import kr.xit.biz.ens.model.nice.NiceCiDTO.IpinCiResEncData; import kr.xit.biz.ens.model.nice.NiceCiDTO.NiceCiRequest; -import kr.xit.biz.sisul.mapper.IBizSisulMapper; -import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulRequest; -import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResDtlData; -import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResMstData; import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.service.AbstractService; +import kr.xit.core.spring.config.support.ProfileConditionOfChuncheon; import kr.xit.core.support.utils.Checks; import kr.xit.core.support.xlsx.StreamingReader; import kr.xit.ens.cmm.CmmEnsUtils; @@ -42,18 +55,6 @@ import kr.xit.ens.nice.cmm.CmmNiceCiUtils; import kr.xit.ens.nice.service.INiceCiService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.apache.poi.ss.usermodel.Cell; -import org.apache.poi.ss.usermodel.CellType; -import org.apache.poi.ss.usermodel.Row; -import org.apache.poi.ss.usermodel.Sheet; -import org.apache.poi.ss.usermodel.Workbook; -import org.jasypt.encryption.StringEncryptor; -import org.json.simple.JSONArray; -import org.json.simple.JSONObject; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.multipart.MultipartFile; /** *
@@ -73,7 +74,8 @@ import org.springframework.web.multipart.MultipartFile;
 @Slf4j
 @RequiredArgsConstructor
 @Service
-public class BizSisulService extends AbstractService implements IBizSisulService {
+@Conditional(ProfileConditionOfChuncheon.class)
+public class BizChuncheonService extends AbstractService implements IBizChuncheonService {
     private final static int FMC_EXCEL_DATA_START_ROW = 1;
     private final static int FMC_EXCEL_CELL_CNT = 58;
 
@@ -81,7 +83,7 @@ public class BizSisulService extends AbstractService implements IBizSisulService
     private final StringEncryptor jasyptStringEncryptor;
     private final INiceCiService niceCiService;
 
-    private final IBizSisulMapper mapper;
+    private final IBizChuncheonMapper mapper;
 
     @Transactional
     @Override
@@ -162,7 +164,7 @@ public class BizSisulService extends AbstractService implements IBizSisulService
 
     @Override
     @Transactional(readOnly = true)
-    public RsltSisulResMstData findSndngResultMaster(final RsltSisulRequest reqDTO) {
+    public ChuncheonSndngResultDTO.RsltChuncheonResMstData findSndngResultMaster(final ChuncheonSndngResultDTO.RsltChuncheonRequest reqDTO) {
         CmmEnsUtils.validate(reqDTO);
         return mapper.selectSndngResultMaster(reqDTO)
             .orElseThrow(() -> BizRuntimeException.create(String.format("[%s] 데이타를 찾을 수 없습니다", reqDTO.getUnitySndngMastrId())));
@@ -170,9 +172,9 @@ public class BizSisulService extends AbstractService implements IBizSisulService
 
     @Override
     @Transactional(readOnly = true)
-    public List findSndngResultDetails(final RsltSisulRequest reqDTO) {
+    public List findSndngResultDetails(final ChuncheonSndngResultDTO.RsltChuncheonRequest reqDTO) {
         CmmEnsUtils.validate(reqDTO);
-        List resList = mapper.selectSndngResultDetails(reqDTO);
+        List resList = mapper.selectSndngResultDetails(reqDTO);
         if(resList.isEmpty())   throw BizRuntimeException.create(String.format("[%s] 데이타를 찾을 수 없습니다", reqDTO.getUnitySndngMastrId()));
         return mapper.selectSndngResultDetails(reqDTO);
     }
diff --git a/mens-api/src/main/java/kr/xit/biz/sisul/service/IBizSisulService.java b/mens-api/src/main/java/kr/xit/biz/chuncheon/service/IBizChuncheonService.java
similarity index 60%
rename from mens-api/src/main/java/kr/xit/biz/sisul/service/IBizSisulService.java
rename to mens-api/src/main/java/kr/xit/biz/chuncheon/service/IBizChuncheonService.java
index ba3a414..5c7ce56 100644
--- a/mens-api/src/main/java/kr/xit/biz/sisul/service/IBizSisulService.java
+++ b/mens-api/src/main/java/kr/xit/biz/chuncheon/service/IBizChuncheonService.java
@@ -1,11 +1,10 @@
-package kr.xit.biz.sisul.service;
+package kr.xit.biz.chuncheon.service;
 
 import java.util.List;
+
+import kr.xit.biz.chuncheon.model.ChuncheonSndngResultDTO;
 import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload;
 import kr.xit.biz.ens.model.cntc.CntcDTO;
-import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulRequest;
-import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResDtlData;
-import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResMstData;
 
 /**
  * 
@@ -22,12 +21,12 @@ import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResMstData;
  *
  * 
*/ -public interface IBizSisulService { +public interface IBizChuncheonService { String fmcExcelUpload(final FmcExcelUpload fileReq); - RsltSisulResMstData findSndngResultMaster(final RsltSisulRequest dto); + ChuncheonSndngResultDTO.RsltChuncheonResMstData findSndngResultMaster(final ChuncheonSndngResultDTO.RsltChuncheonRequest dto); - List findSndngResultDetails(final RsltSisulRequest dto); + List findSndngResultDetails(final ChuncheonSndngResultDTO.RsltChuncheonRequest dto); String procCntcData(final CntcDTO.SndngMst dto); } diff --git a/mens-api/src/main/java/kr/xit/biz/sisul/web/BizSisulController.java b/mens-api/src/main/java/kr/xit/biz/chuncheon/web/BizChuncheonController.java similarity index 80% rename from mens-api/src/main/java/kr/xit/biz/sisul/web/BizSisulController.java rename to mens-api/src/main/java/kr/xit/biz/chuncheon/web/BizChuncheonController.java index 681f52d..b53f290 100644 --- a/mens-api/src/main/java/kr/xit/biz/sisul/web/BizSisulController.java +++ b/mens-api/src/main/java/kr/xit/biz/chuncheon/web/BizChuncheonController.java @@ -1,21 +1,24 @@ -package kr.xit.biz.sisul.web; +package kr.xit.biz.chuncheon.web; + +import org.springframework.context.annotation.Conditional; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.ModelAttribute; +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; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; +import kr.xit.biz.chuncheon.model.ChuncheonSndngResultDTO; +import kr.xit.biz.chuncheon.service.IBizChuncheonService; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload; import kr.xit.biz.ens.model.cntc.CntcDTO; -import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulRequest; -import kr.xit.biz.sisul.service.IBizSisulService; import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.model.IApiResponse; +import kr.xit.core.spring.config.support.ProfileConditionOfChuncheon; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.ModelAttribute; -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; /** *
@@ -33,13 +36,14 @@ import org.springframework.web.bind.annotation.RestController;
  * 
*/ @Slf4j -@Tag(name = "BizSisulController", description = "전자고지 시설관리 시스템 연계 관련 처리") +@Tag(name = "BizChuncheonController", description = "전자고지 춘천 시스템 연계 관련 처리") @RequiredArgsConstructor @RestController -@RequestMapping(value = "/api/biz/sisul/v1") -public class BizSisulController { +@RequestMapping(value = "/api/biz/chuncheon/v1") +@Conditional(ProfileConditionOfChuncheon.class) +public class BizChuncheonController { - private final IBizSisulService service; + private final IBizChuncheonService service; /** * 시설관리공단(Facility Management Corporation) 전자고지 대상 @@ -55,13 +59,13 @@ public class BizSisulController { @Operation(summary = "발송결과정보 마스터 조회 - 시설공단 내부시스템에서 호출", description = "발송결과정보 마스터 조회 - 시설공단 내부시스템에서 호출") @PostMapping(value = "/sndng/result/master", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - public IApiResponse findSndngResultMaster(@RequestBody RsltSisulRequest reqDTO) { + public IApiResponse findSndngResultMaster(@RequestBody ChuncheonSndngResultDTO.RsltChuncheonRequest reqDTO) { return ApiResponseDTO.success(service.findSndngResultMaster(reqDTO)); } @Operation(summary = "발송결과정보 상세 조회 - 시설공단 내부시스템에서 호출", description = "발송결과정보 상세 조회 - 시설공단 내부시스템에서 호출") @PostMapping(value = "/sndng/result/details", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - public IApiResponse findSndngResultDetails(@RequestBody RsltSisulRequest reqDTO) { + public IApiResponse findSndngResultDetails(@RequestBody ChuncheonSndngResultDTO.RsltChuncheonRequest reqDTO) { return ApiResponseDTO.success(service.findSndngResultDetails(reqDTO)); } diff --git a/mens-api/src/main/resources/config/application-ens.yml b/mens-api/src/main/resources/config/application-ens.yml index 9b2c58c..3e76d03 100644 --- a/mens-api/src/main/resources/config/application-ens.yml +++ b/mens-api/src/main/resources/config/application-ens.yml @@ -15,8 +15,8 @@ app: kakao: bulk-max-cnt: 10 host: https://docs-gw.kakaopay.com - # token: dd394da7f66211eb9cbe46e139ceffc2 - # uuid: CON-41ef0535f67211ebbdedd2e6ed332381 + # token: dd394da7f66211eb9cbe46e139ceffc2 + # uuid: CON-41ef0535f67211ebbdedd2e6ed332381 api: send: /v1/documents;POST validToken: /v1/{document_binder_uuid}/tokens/{tokens};GET @@ -26,11 +26,11 @@ app: bulkstatus: /v1/documents/bulk/status;POST nice: host: https://svc.niceapi.co.kr:22001 - # signgu-code: 11000 - # ffnlg-code: 11 - # client-id: 6c3eb1ff-530d-458a-9a6e-e02e3346f679 - # client-secret: 960f204ec45bb312b7ad2d6b54b984d9c353b8 - # product-id: 2101466024 + # signgu-code: 11000 + # ffnlg-code: 11 + # client-id: 6c3eb1ff-530d-458a-9a6e-e02e3346f679 + # client-secret: 960f204ec45bb312b7ad2d6b54b984d9c353b8 + # product-id: 2101466024 api: generate-token: /digital/niceid/oauth/oauth/token revoke-token: /digital/niceid/oauth/oauth/token/revokeById @@ -74,15 +74,3 @@ app: info-acmd: /api/acmdinfo # 전자문서유통정보수치확인서 발급처리 : BC-AG-HS-002 cfm-acmd: /api/acmdinfocfm - - pplus: - host: https://t.postplus.co.kr - api: - # 우편 제작 접수 - accept: /po/api/postplusPstMsrApi.do - # 우편 제작 상태 조회 - status: /po/api/postplusPstStatusApi.do - epost: - host: http://openapi.epost.go.kr - api: - postTrackInfo: /trace/retrieveLongitudinalCombinedService/retrieveLongitudinalCombinedService/getLongitudinalCombinedList diff --git a/mens-api/src/main/resources/config/application-local-cheonan.yml b/mens-api/src/main/resources/config/application-local-cheonan.yml new file mode 100644 index 0000000..7967838 --- /dev/null +++ b/mens-api/src/main/resources/config/application-local-cheonan.yml @@ -0,0 +1,129 @@ +#----------------------------------------------------------------------- +# local 설정 +#----------------------------------------------------------------------- +spring: + datasource: + hikari: + # 9 server + primary: + database: oracle + driver-class-name: oracle.jdbc.OracleDriver + jdbc-url: jdbc:oracle:thin:@211.119.124.118:1521:bustms + username: iup + password: iup!0202 + read-only: false + 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 + + devtools: + restart: + enabled: true + additional-exclude: static/**,public/** + livereload: + enabled: true + +springdoc: + api-docs: + enabled: true + swagger-ui: + enabled: true + +logging: + level: + root: debug + org.apache.http: warn + io.netty: warn + reactor.netty: WARN + # webclient logging + reactor.netty.http.client: DEBUG + #org.springframework.web.reactive.function.client.ExchangeFunctions: TRACE + org.springframework: warn + org.hibernate.validator.internal: WARN + file: + # 로그파일 위치 + path: ${app.data.root.path}/mens/logs + name: ${app.name} + +# ================================================================================================================== +# SQL logging lib setting +# ================================================================================================================== +decorator: + datasource: + p6spy: + enable-logging: true + +app: + api-ip: 211.119.124.73 + # 강제로 swagger-url을 지정해야 하는 경우만 선언 + #swagger-url: 'http://localhost:${server.port}${server.servlet.context-path:}/' + # Spring Security cors 설정 :: CorsConfiguration 설정 값 + cors: + allowed-origins: http://localhost:8080, http://${app.api-ip}:8080, http://localhost:8082, http://${app.api-ip}:8082 + + data: + root: + #path: /Users/minuk/data + path: d:/data + + #--------------------------------------------------------------- + # log 설정 + # request: + # custom-enabled | common-enabled | filter-enabled 중 1개만 활성화 + # --> 운영: common-enabled, 개발: custom-enabled 사용 권장 + # response-enabled : 호출 결과 출력 - 운영시 false + # mdc : api 호출(서비스) 로그 기록 + # uris : api 호출 로그 제외 패턴 + #--------------------------------------------------------------- + log: + request: + custom-enabled: true + response-enabled: true + # MDC logging trace 활성 + mdc: + enabled: true + + # slack + slack-webhook: + enabled: false + url: https://hooks.slack.com/services/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 + + ssh: + host: 211.119.124.9 + port: 22 + id: xituser + passwd: xituser!@ + sg: + root-path: /data/mens/sg-pni-cctv + ens-path: /data/mens/sg-ens-cctv + rcv: /rcv + backup: /backup + err: /err + + contract: + # milisecond + connection: + timeout: 60000 + readTimeout: 60000 + + kt: + # vpn 사용 + #host: http://172.16.0.13:10210/ONLWeb + host: http://211.43.10.163:10210/ONLWeb + api: + # 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송 + dp-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/dpMblPage.do + me-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/meMblPage.do + #dp-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/dpMblPage + #me-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/meMblPage + + # 수신거부상태전송 : BC-AG-SN-014 + refuse-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/refuse + # 수신동의상태전송 : BC-AG-SN-015 + approve-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/approve diff --git a/mens-api/src/main/resources/config/application-local-chuncheon.yml b/mens-api/src/main/resources/config/application-local-chuncheon.yml new file mode 100644 index 0000000..25e3741 --- /dev/null +++ b/mens-api/src/main/resources/config/application-local-chuncheon.yml @@ -0,0 +1,130 @@ +#----------------------------------------------------------------------- +# local 설정 +#----------------------------------------------------------------------- +spring: + datasource: + hikari: + # 9 server + primary: + database: mysql + driver-class-name: org.mariadb.jdbc.Driver + jdbc-url: jdbc:mariadb://211.119.124.117:53306/ens?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true + username: ens + password: xit5811807 + read-only: false + pool-name: xit-maria-pool + auto-commit: false + # 인프라의 적용된 connection time limit보다 작아야함 + validation-timeout: 300000 + max-lifetime: 1800000 + maximum-pool-size: 15 + minimum-idle: 5 + #transaction-isolation: TRANSACTION_READ_UNCOMMITTED + data-source-properties: + rewriteBatchedStatements: true + + devtools: + restart: + enabled: true + additional-exclude: static/**,public/** + livereload: + enabled: true + +springdoc: + api-docs: + enabled: true + swagger-ui: + enabled: true + +logging: + level: + root: debug + org.apache.http: warn + io.netty: warn + reactor.netty: WARN + # webclient logging + reactor.netty.http.client: DEBUG + #org.springframework.web.reactive.function.client.ExchangeFunctions: TRACE + org.springframework: warn + org.hibernate.validator.internal: WARN + file: + # 로그파일 위치 + path: ${app.data.root.path}/mens/logs + name: ${app.name} + +# ================================================================================================================== +# SQL logging lib setting +# ================================================================================================================== +decorator: + datasource: + p6spy: + enable-logging: true + +app: + api-ip: 211.119.124.73 + # 강제로 swagger-url을 지정해야 하는 경우만 선언 + #swagger-url: 'http://localhost:${server.port}${server.servlet.context-path:}/' + # Spring Security cors 설정 :: CorsConfiguration 설정 값 + cors: + allowed-origins: http://localhost:8080, http://${app.api-ip}:8080, http://localhost:8082, http://${app.api-ip}:8082 + + data: + root: + #path: /Users/minuk/data + path: d:/data + + #--------------------------------------------------------------- + # log 설정 + # request: + # custom-enabled | common-enabled | filter-enabled 중 1개만 활성화 + # --> 운영: common-enabled, 개발: custom-enabled 사용 권장 + # response-enabled : 호출 결과 출력 - 운영시 false + # mdc : api 호출(서비스) 로그 기록 + # uris : api 호출 로그 제외 패턴 + #--------------------------------------------------------------- + log: + request: + custom-enabled: true + response-enabled: true + # MDC logging trace 활성 + mdc: + enabled: true + + # slack + slack-webhook: + enabled: false + url: https://hooks.slack.com/services/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 + + ssh: + host: 211.119.124.9 + port: 22 + id: xituser + passwd: xituser!@ + sg: + root-path: /data/mens/sg-pni-cctv + ens-path: /data/mens/sg-ens-cctv + rcv: /rcv + backup: /backup + err: /err + + contract: + # milisecond + connection: + timeout: 60000 + readTimeout: 60000 + + kt: + # vpn 사용 + #host: http://172.16.0.13:10210/ONLWeb + host: http://211.43.10.163:10210/ONLWeb + api: + # 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송 + dp-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/dpMblPage.do + me-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/meMblPage.do + #dp-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/dpMblPage + #me-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/meMblPage + + # 수신거부상태전송 : BC-AG-SN-014 + refuse-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/refuse + # 수신동의상태전송 : BC-AG-SN-015 + approve-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/approve diff --git a/mens-api/src/main/resources/config/application-local.yml b/mens-api/src/main/resources/config/application-local.yml index 94e7fec..807041c 100644 --- a/mens-api/src/main/resources/config/application-local.yml +++ b/mens-api/src/main/resources/config/application-local.yml @@ -8,18 +8,37 @@ spring: primary: database: mysql driver-class-name: org.mariadb.jdbc.Driver - jdbc-url: jdbc:mariadb://211.119.124.9:4407/mens?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true - username: root - password: xit1807 + jdbc-url: jdbc:mariadb://211.119.124.117:53306/ens?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true + username: ens + password: xit5811807 read-only: false + pool-name: xit-maria-pool + auto-commit: false + # 인프라의 적용된 connection time limit보다 작아야함 + validation-timeout: 300000 + max-lifetime: 1800000 + maximum-pool-size: 15 + minimum-idle: 5 + #transaction-isolation: TRANSACTION_READ_UNCOMMITTED + data-source-properties: + rewriteBatchedStatements: true # multi-database secondary: database: oracle driver-class-name: oracle.jdbc.OracleDriver - jdbc-url: jdbc:oracle:thin:@211.119.124.117:1521:ora11g - username: xit_traffic - password: traffic5 + jdbc-url: jdbc:oracle:thin:@211.119.124.118:1521:bustms + username: iup + password: iup!0202 read-only: false + 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 devtools: restart: diff --git a/mens-api/src/main/resources/config/application.yml b/mens-api/src/main/resources/config/application.yml index 164b1d7..9e64ae0 100644 --- a/mens-api/src/main/resources/config/application.yml +++ b/mens-api/src/main/resources/config/application.yml @@ -61,32 +61,11 @@ spring: #----------------------------------------------------------------- # xit framework 설정 #----------------------------------------------------------------- - datasource: - #type: com.zaxxer.hikari.HikariDataSource - hikari: - primary: - pool-name: xit-maria-pool - auto-commit: false - # 인프라의 적용된 connection time limit보다 작아야함 - validation-timeout: 300000 - 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: root: error + '[org.apache.tomcat.util.net]': warn + '[sun.rmi]': warn + '[javax.management]': warn + '[java.io.serialization]': warn diff --git a/mens-api/src/main/resources/egovframework/mapper/biz/ens-sisul-mysql-mapper.xml b/mens-api/src/main/resources/egovframework/mapper/biz/ens-chuncheon-mysql-mapper.xml similarity index 81% rename from mens-api/src/main/resources/egovframework/mapper/biz/ens-sisul-mysql-mapper.xml rename to mens-api/src/main/resources/egovframework/mapper/biz/ens-chuncheon-mysql-mapper.xml index 43058eb..87eca3a 100644 --- a/mens-api/src/main/resources/egovframework/mapper/biz/ens-sisul-mysql-mapper.xml +++ b/mens-api/src/main/resources/egovframework/mapper/biz/ens-chuncheon-mysql-mapper.xml @@ -1,7 +1,7 @@ - + + - /** ens-sysul-mysql-mapper|selectSndngResultDetails-발송결과정보 상세 조회|julim */ SELECT tesn.unity_sndng_mastr_id /* 통합발송마스터 ID - 파일유일키 */ , tcsnd.unity_sndng_detail_id /* 통합발송상세 ID - 우편물 일련번호 */ @@ -156,38 +156,6 @@ - - - /** ens-pplus-mapper|selectPostPlusSendTgts-Post Plus 발송 대상 목록 조회|julim */ - SELECT tesm.unity_sndng_mastr_id - , tesm.sndng_mastr_id - , CASE WHEN tesm.try_seq = tesm.try_cnt THEN 'send-ok' - ELSE concat('sending', try_seq) - END AS sndngProcessSttus - , tepp.sndng_detail_id - , tepp.unity_sndng_detail_id - , tepp.signgu_code - , tepp.ffnlg_code - , tepp.service_cd - , tepp.con_key - , teppj.master_cols - , teppj.master_rows - , teppj.detail_cols - , teppj.detail_rows - FROM tb_ens_sndng_mastr tesm - JOIN tb_ens_post_plus tepp - ON tesm.sndng_mastr_id=tepp.sndng_mastr_id - AND tesm.signgu_code = tepp.signgu_code - AND tesm.ffnlg_code = tepp.ffnlg_code - JOIN tb_ens_post_plus_json teppj - ON tepp.unity_sndng_detail_id = teppj.unity_sndng_detail_id - AND tepp.con_key = teppj.con_key - AND tepp.sn = teppj.sn - WHERE tepp.sndng_mastr_id = #{sndngMastrId} - AND tesm.signgu_code = #{signguCode} - AND tesm.ffnlg_code = #{ffnlgCode} - ORDER BY teppj.sn - - - diff --git a/mens-api/src/main/resources/egovframework/mapper/other/other-oracle-mapper.xml b/mens-api/src/main/resources/egovframework/mapper/other/other-oracle-mapper.xml deleted file mode 100644 index 4177e14..0000000 --- a/mens-api/src/main/resources/egovframework/mapper/other/other-oracle-mapper.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - /** other-oracle-mapper|saveElecnoticemst-전자고지 파일 외부연계 마스터 Merge|jhseo */ - MERGE - INTO elecnoticemst a - USING dual - ON (a.unitysndngmastrid = #{unitysndngmastrid}) - WHEN MATCHED THEN - UPDATE - SET a.sndngco = #{sndngco} - , a.sndngprocesssttus = #{sndngprocesssttus} - , a.sndngdt = TO_DATE(#{sndngdt},'YYYYMMDDHH24MISS') - , a.tmplatid = #{tmplatid} - , a.message = SUBSTRB(#{message}, 1, 100) - , a.upduser = #{upduser} - , a.upddate = sysdate - WHEN NOT MATCHED THEN - INSERT (a.unitysndngmastrid - , a.sndngco - , a.sndngprocesssttus - , a.insuser - , a.insdate - , a.sndngdt - , a.sndngsecode - , a.tmplatid - , a.searchdate - , a.success - , a.message - ) - VALUES (#{unitysndngmastrid} - , #{sndngco} - , #{sndngprocesssttus} - , #{insuser} - , sysdate - , TO_DATE(#{sndngdt},'YYYYMMDDHH24MISS') - , #{sndngsecode} - , #{tmplatid} - , TO_DATE(#{searchdate},'YYYYMMDDHH24MISS') - , #{success} - , SUBSTRB(#{message}, 1, 100) - ) - - - - - /** other-oracle-mapper|saveElecnoticedtl-전자고지 파일 외부연계 상세 Merge|jhseo */ - MERGE - INTO elecnoticedtl b - USING dual - ON (b.unitysndngmastrid = #{unitysndngmastrid} AND b.unitysndngdetailid = #{unitysndngdetailid}) - WHEN MATCHED THEN - UPDATE - SET b.tmplatid = #{tmplatid} - , b.recvdt = TO_DATE(#{recvdt},'YYYYMMDDHH24MISS') - , b.readdt = TO_DATE(#{readdt},'YYYYMMDDHH24MISS') - , b.resultcode = #{resultcode} - , b.upduser = #{upduser} - , b.upddate = sysdate - WHEN NOT MATCHED THEN - INSERT (b.unitysndngmastrid - , b.unitysndngdetailid - , b.sndngdt - , b.tmplatid - , b.gojidepth - , b.taxnum1 - , b.taxnum2 - , b.taxnum3 - , b.taxnum4 - , b.worker - , b.serialno - , b.recvdt - , b.readdt - , b.resultcode - , b.insuser - , b.insdate - ) - VALUES (#{unitysndngmastrid} - , #{unitysndngdetailid} - , TO_DATE(#{sndngdt},'YYYYMMDDHH24MISS') - , #{tmplatid} - , #{gojidepth} - , #{taxnum1} - , #{taxnum2} - , #{taxnum3} - , #{taxnum4} - , #{worker} - , #{serialno} - , TO_DATE(#{recvdt},'YYYYMMDDHH24MISS') - , TO_DATE(#{readdt},'YYYYMMDDHH24MISS') - , #{resultcode} - , #{insuser} - , sysdate - ) - - - diff --git a/mens-api/src/main/resources/logback-spring.xml b/mens-api/src/main/resources/logback-spring.xml index e5ae60d..83e280c 100644 --- a/mens-api/src/main/resources/logback-spring.xml +++ b/mens-api/src/main/resources/logback-spring.xml @@ -14,7 +14,7 @@ --> - + @@ -115,7 +115,7 @@ - + @@ -174,7 +174,7 @@ - + diff --git a/mens-core/src/main/java/kr/xit/core/spring/config/support/ProfileConditionOfCheonan.java b/mens-core/src/main/java/kr/xit/core/spring/config/support/ProfileConditionOfCheonan.java new file mode 100644 index 0000000..1e539f1 --- /dev/null +++ b/mens-core/src/main/java/kr/xit/core/spring/config/support/ProfileConditionOfCheonan.java @@ -0,0 +1,20 @@ +package kr.xit.core.spring.config.support; + +import org.springframework.context.annotation.Condition; +import org.springframework.context.annotation.ConditionContext; +import org.springframework.core.type.AnnotatedTypeMetadata; + +import lombok.NonNull; + +public class ProfileConditionOfCheonan implements Condition { + @Override + public boolean matches(ConditionContext context, @NonNull AnnotatedTypeMetadata metadata) { + String[] activeProfiles = context.getEnvironment().getActiveProfiles(); + for (String profile : activeProfiles) { + if (profile.matches(".*cheonan.*")) { + return true; + } + } + return false; + } +} diff --git a/mens-core/src/main/java/kr/xit/core/spring/config/support/ProfileConditionOfChuncheon.java b/mens-core/src/main/java/kr/xit/core/spring/config/support/ProfileConditionOfChuncheon.java new file mode 100644 index 0000000..4588e68 --- /dev/null +++ b/mens-core/src/main/java/kr/xit/core/spring/config/support/ProfileConditionOfChuncheon.java @@ -0,0 +1,20 @@ +package kr.xit.core.spring.config.support; + +import org.springframework.context.annotation.Condition; +import org.springframework.context.annotation.ConditionContext; +import org.springframework.core.type.AnnotatedTypeMetadata; + +import lombok.NonNull; + +public class ProfileConditionOfChuncheon implements Condition { + @Override + public boolean matches(ConditionContext context, @NonNull AnnotatedTypeMetadata metadata) { + String[] activeProfiles = context.getEnvironment().getActiveProfiles(); + for (String profile : activeProfiles) { + if (profile.matches(".*chuncheon.*")) { + return true; + } + } + return false; + } +} diff --git a/mens-core/src/main/java/kr/xit/core/spring/config/support/ProfileConditionOfSisul.java b/mens-core/src/main/java/kr/xit/core/spring/config/support/ProfileConditionOfSisul.java new file mode 100644 index 0000000..9fa372f --- /dev/null +++ b/mens-core/src/main/java/kr/xit/core/spring/config/support/ProfileConditionOfSisul.java @@ -0,0 +1,20 @@ +package kr.xit.core.spring.config.support; + +import org.springframework.context.annotation.Condition; +import org.springframework.context.annotation.ConditionContext; +import org.springframework.core.type.AnnotatedTypeMetadata; + +import lombok.NonNull; + +public class ProfileConditionOfSisul implements Condition { + @Override + public boolean matches(ConditionContext context, @NonNull AnnotatedTypeMetadata metadata) { + String[] activeProfiles = context.getEnvironment().getActiveProfiles(); + for (String profile : activeProfiles) { + if (profile.matches(".*sisul.*")) { + return true; + } + } + return false; + } +} diff --git a/pom.xml b/pom.xml index a33fdf6..c3a8dfd 100644 --- a/pom.xml +++ b/pom.xml @@ -280,6 +280,26 @@ + + local-chuncheon + + local-chuncheon + + + false + + + + + local-cheonan + + local-cheonan + + + false + + + dev