메시지 분석 기능 진행중

- 메시지 분석 기능이 bean 초기화시 기존 프로세스와 중복되는 부분이 있으므로 수정 필요
main
semin.baek 7 months ago
parent f32bdca9b0
commit e9ac6b20bb

@ -46,7 +46,6 @@ repositories {
url = 'https://maven.cubrid.org'
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-web'

@ -0,0 +1,17 @@
#!/bin/bash
AGENT_HOME=/home/dfxagent/agent
SETTING_FILE=$AGENT_HOME/conf/settings.json
PARSE_MESSAGE_FILE_OPTION=$1
OUTPUT_OPTION=""
if [ -n "$2" ]; then
OUTPUT_OPTION=$2
fi
# 🟢 실행 명령
echo "java -jar $AGENT_HOME/lib/dfxagent.jar \
--setting.file=$SETTING_FILE \
$PARSE_MESSAGE_FILE_OPTION \
$OUTPUT_OPTION"

@ -1,135 +1,870 @@
{
"myHostId": "first-agent",
"myListenPort": 16801,
"description": "로컬 테스트용",
"myHostId": "local-dev-oracle",
"myListenPort": 17801,
"knownAgentList": [
{
"hostId": "second-agent",
"hostName": "mkami.foxsoft.kr",
"listenPort": 16801,
"hostId": "fox-ami-dev-cubrid",
"hostName": "ami.foxsoft.kr",
"listenPort": 17801,
"dropBoxIdList": [
"drop1",
"drop2"
]
},
{
"hostId": "third-agent",
"hostName": "defree.co.kr",
"listenPort": 16801,
"dropBoxIdList": [
"drop3",
"drop4"
"dropbox-fox-ami-dev-cubrid-receive-code-list",
"dropbox-fox-ami-dev-cubrid-receive-comm-meth-list",
"dropbox-fox-ami-dev-cubrid-receive-dept-list",
"dropbox-fox-ami-dev-cubrid-receive-err-cause-list",
"dropbox-fox-ami-dev-cubrid-receive-err-type-list",
"dropbox-fox-ami-dev-cubrid-receive-kdn-dept-list",
"dropbox-fox-ami-dev-cubrid-receive-order-list",
"dropbox-fox-ami-dev-cubrid-receive-work-group-list",
"dropbox-fox-ami-dev-cubrid-receive-fac-err-cur-dcu-list",
"dropbox-fox-ami-dev-cubrid-receive-fac-err-cur-modem-list",
"dropbox-fox-ami-dev-cubrid-receive-fcty-danger-info-list",
"dropbox-fox-ami-dev-cubrid-receive-fcty-cs-meter-info-list",
"dropbox-fox-ami-dev-cubrid-receive-fcty-dcu-info-list",
"dropbox-fox-ami-dev-cubrid-receive-sigong-master-list",
"dropbox-fox-ami-dev-cubrid-receive-sigong-sbcn-co-list",
"dropbox-fox-ami-dev-cubrid-receive-sigong-order-new-modem-list",
"dropbox-fox-ami-dev-cubrid-receive-sigong-order-sig-modem-list",
"dropbox-fox-ami-dev-cubrid-receive-meter-ndl-lst-list",
"dropbox-fox-ami-dev-cubrid-receive-mtr-mst-list",
"dropbox-fox-ami-dev-cubrid-receive-mtr-mst-detail-list",
"dropbox-fox-ami-dev-cubrid-receive-mtr-inst-list",
"dropbox-fox-ami-dev-cubrid-receive-ann-mtr-insp-expr-list",
"dropbox-fox-ami-dev-cubrid-receive-inln-co-list",
"dropbox-fox-ami-dev-cubrid-receive-sbcn-co-list",
"dropbox-fox-ami-dev-cubrid-receive-equip-mtrl-list",
"dropbox-fox-ami-dev-cubrid-receive-mng-plce-list",
"dropbox-fox-ami-dev-cubrid-receive-pckn-list",
"dropbox-fox-ami-dev-cubrid-receive-mtrl-tp-list"
]
}
],
"statusChecker": {
"cron": "0/5 * * * * *"
},
"dataSourceConfig": [
{
"dataSourceId": "oracle",
"driverClassName": "org.postgresql.Driver",
"url": "jdbc:oracle:thin:@192.168.0.221:1521:xe",
"dataSourceId": "ds-oracle",
"driverClassName": "oracle.jdbc.driver.OracleDriver",
"url": "jdbc:oracle:thin:@mkami.foxsoft.kr:1521:xe",
"username": "ami",
"password": "fox12#$%"
},
{
"dataSourceId": "mochastory",
"driverClassName": "com.mysql.jdbc.Driver",
"url": "jdbc:mysql://bsm-lab.com:3306/MOCHASTORY?allowPublicKeyRetrieval=true",
"username": "MOCHASTORY",
"password": "MOCHASTORY"
"password": "fox12#$%",
"maximumRowForTransaction": 1000
}
],
"sqlMapperLocations": [
"D:/projects/bsm-lab/dfx/dfxagent/src/docs/mapper-examples/**/*.xml"
"/home/dfxagent/agent/conf/mappers/**/*.xml"
],
"dropBox": {
"logging": {
"logDirectory": "/home/dfxagent/agent/logs",
"logFileName": "dfxagent.log",
"logName": "DFX_LOG",
"maxHistory": 30,
"logPattern": "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n",
"rootLogLevel": "DEBUG",
"packages": [
{
"com.bsmlab.dfx.agent": "DEBUG",
"jdbc.sqlonly": "DEBUG",
"org.springframework": "INFO"
}
]
},
"dropBoxConfig": {
"receivedMessageStorageRoot": "D:/projects/bsm-lab/dfx/dfxagent/src/docs/messages/received",
"processedMessageStorageRoot": "D:/projects/bsm-lab/dfx/dfxagent/src/docs/messages/processed",
"failureMessageStorageRoot": "D:/projects/bsm-lab/dfx/dfxagent/src/docs/messages/failure",
"threadPoolSize": 300,
"retentionDaysOfProcessedMessage": 60,
"dropBoxList": [
{
"dropBoxId": "save-violation-history",
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-atch-file-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "dfcms",
"sqlId": "dfcms.violation.insertViolationHistory"
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.fmp.cdm.insertAtchFileListForReceive",
"description": "공통 첨부파일 수신"
},
{
"dropBoxId": "receive-work-image-file",
"taskType": "RECEIVE_FILE",
"saveDirectoryRoot": "D:\\projects\\bsm-lab\\dfx\\run\\receive_file"
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-atch-file-detail-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.fmp.cdm.insertAtchFileListDetailForReceive",
"description": "공통 첨부파일상세 수신"
},
{
"dropBoxId": "save-work-image-file-info",
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-work-act-dcu-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "dfcms",
"sqlId": "dfcms.file.insertFileInfo"
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.obs.insertWorkActDcuListForReceive",
"description": "유지관리 조치내용_DCU 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-work-act-modem-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.obs.insertWorkActModemListForReceive",
"description": "유지관리 조치내용_모뎀 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-etc-act-dcu-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.obs.insertEtcActDcuListForReceive",
"description": "유지관리 기타 조치_DCU 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-etc-act-modem-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.obs.insertEtcActModemListForReceive",
"description": "유지관리 기타 조치_모뎀계기 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-work-act-svc-cd-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.obs.insertWorkActSvcCdListForReceive",
"description": "유지관리 조치내용_노임품목 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-sigong-act-dcu-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.cst.insertSigongActDcuListForReceive",
"description": "AMI공사관리 시공조치내역_DCU 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-sigong-act-modem-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.cst.insertSigongActModemListForReceive",
"description": "AMI공사관리 시공조치내역_모뎀 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-sigong-unable-dcu-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.cst.insertSigongUnableDcuListForReceive",
"description": "AMI공사관리 설치불가/철거내역_DCU 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-sigong-unable-modem-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.cst.insertSigongUnableModemListForReceive",
"description": "AMI공사관리 설치불가/철거내역_모뎀 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-meter-ndl-act-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.emr.insertMeterNdlActListForReceive",
"description": "임시조치 당월검침정보(데이터) 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-remo-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.insertMtrRemoListForReceive",
"description": "계기관리 부설 작업 상세 정보 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-ct-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.insertMtrCtListForReceive",
"description": "계기관리 부속 변류기 작업 정보 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-ct-detail-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.insertMtrCtDetailListForReceive",
"description": "계기관리 부속 변류기 상세 작업 정보 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-ts-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.insertMtrTsListForReceive",
"description": "계기관리 부속 타임스위치 작업 정보 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-ms-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.insertMtrMsListForReceive",
"description": "계기관리 부속 전자접촉기 작업 정보 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-mb-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.insertMtrMbListForReceive",
"description": "계기관리 부속 계기함 작업 정보 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-spd-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.insertMtrSpdListForReceive",
"description": "계기관리 부속 SPD 작업 정보 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-gd-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.insertMtrGdListForReceive",
"description": "계기관리 지침작업정보 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-sl-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.insertMtrSlListForReceive",
"description": "계기관리 봉인작업정보 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-pt-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.insertMtrPtListForReceive",
"description": "계기관리 변성기 작업 정보 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-ttb-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.insertMtrTtbListForReceive",
"description": "계기관리 시험용단자대 작업 정보 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-equip-base-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtl.insertEquipBaseListForReceive",
"description": "자재관리 자재기본정보 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-equip-move-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtl.insertEquipMoveListForReceive",
"description": "자재관리 자재이력정보 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-dlvg-dcu-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtl.insertDlvgDcuListForReceive",
"description": "자재관리 자재납품마스터_DCU 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-dlvg-modm-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtl.insertDlvgModmListForReceive",
"description": "자재관리 자재납품마스터_모뎀 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-dlvg-metr-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtl.insertDlvgMetrListForReceive",
"description": "자재관리 자재납품마스터_계기 수신"
},
{
"dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-dlvg-lte-modm-list",
"taskType": "RECEIVE_DB_TO_DB_SAVE",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtl.insertDlvgLteModmListForReceive",
"description": "자재관리 자재납품마스터_LTE모뎀 수신"
}
]
},
"postman": [
"postmanConfig": {
"threadPoolSize": 30,
"postmanList": [
{
"postmanId": "postman1",
"postmanId": "postman-fox-mkami-dev-oracle-send-code-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "TRIGGER",
"command": "runSelectSomeThenSend",
"parametersKeyList": [
"REG_DATE_FROM",
"REG_DATE_TO"
]
"type": "SCHEDULED",
"cron": "1 1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "dfcms",
"sqlId": "dfcms.selectSome"
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.fmp.cdm.selectCodeListForSend",
"postProcessingSqlId": "com.kdn.mkami.fmp.cdm.updateCodeListTransferDone"
},
"recipientHostId": "third-agent",
"recipientDropBoxId": "drop3",
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-code-list",
"routingHostIdList": [
"first-agent",
"second-agent",
"third-agent"
]
"fox-ami-dev-cubrid"
],
"description": "공통 T_CODE 송신"
},
{
"postmanId": "postman-oracle-tto-bd-10",
"postmanId": "postman-fox-mkami-dev-oracle-send-comm-meth-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "0 */1 * * * *"
"cron": "2 1 0 * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "oracle",
"sqlId": "address.postman.oracle.ttoBd.selectTtoBd10"
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.fmp.cdm.selectCommMethListForSend",
"postProcessingSqlId": "com.kdn.mkami.fmp.cdm.updateCommMethListTransferDone"
},
"recipientHostId": "third-agent",
"recipientDropBoxId": "drop3",
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-comm-meth-list",
"routingHostIdList": [
"first-agent",
"second-agent",
"third-agent"
]
"fox-ami-dev-cubrid"
],
"description": "공통 T_COMM_METH 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-dept-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "3 1 0 * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.fmp.cdm.selectDeptListForSend",
"postProcessingSqlId": "com.kdn.mkami.fmp.cdm.updateDeptListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-dept-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "공통 T_DEPT 송신"
},
{
"postmanId": "postman3",
"taskType": "FILE_READ_THEN_SEND",
"postmanId": "postman-fox-mkami-dev-oracle-send-err-cause-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "0 1 3 * * *"
"cron": "4 1 0 * * *"
},
"message": {
"messageType": "TRANSFER_FILE",
"watchDirectory": "D:\\projects\\bsm-lab\\dfx\\run\\send_file",
"metaDataDataSourceId": "save-work-image-file-info",
"metaDataSqlId": "dfcms.file.selectFileInfo",
"metaDropBoxId": "save-work-image-file-info"
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.fmp.cdm.selectErrCauseListForSend",
"postProcessingSqlId": "com.kdn.mkami.fmp.cdm.updateErrCauseListTransferDone"
},
"recipientHostId": "third-agent",
"recipientDropBoxId": "drop4",
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-err-cause-list",
"routingHostIdList": [
"first-agent",
"second-agent",
"third-agent"
]
"fox-ami-dev-cubrid"
],
"description": "공통 T_ERR_CAUSE 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-err-type-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "5 1 0 * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.fmp.cdm.selectErrTypeListForSend",
"postProcessingSqlId": "com.kdn.mkami.fmp.cdm.updateErrTypeListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-err-type-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "공통 T_ERR_TYPE 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-kdn-dept-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "6 1 0 * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.fmp.cdm.selectKdnDeptListForSend",
"postProcessingSqlId": "com.kdn.mkami.fmp.cdm.updateKdnDeptListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-kdn-dept-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "공통 T_KDN_DEPT 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-order-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "7 1 0 * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.fmp.cdm.selectOrderListForSend",
"postProcessingSqlId": "com.kdn.mkami.fmp.cdm.updateOrderListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-order-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "공통 T_ORDER 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-work-group-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "8 1 0 * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.fmp.cdm.selectWorkGroupListForSend",
"postProcessingSqlId": "com.kdn.mkami.fmp.cdm.updateWorkGroupListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-work-group-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "공통 T_WORK_GROUP 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-fac-err-cur-dcu-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "31 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.obs.selectFacErrCurDcuListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.obs.updateFacErrCurDcuListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-fac-err-cur-dcu-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "유지관리 작업대상_DCU 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-fac-err-cur-modem-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "32 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.obs.selectFacErrCurModemListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.obs.updateFacErrCurModemListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-fac-err-cur-modem-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "유지관리 작업대상_모뎀 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-fcty-danger-info-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "33 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.obs.selectFctyDangerInfoListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.obs.updateFctyDangerInfoListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-fcty-danger-info-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "유지관리 위험불가개소 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-fac-err-clr-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "34 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.obs.selectFacErrClrListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.obs.updateFacErrClrListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-fac-err-clr-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "유지관리 계기장애처리완료 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-fcty-cs-meter-info-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "35 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.obs.selectFctyCsMeterInfoListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.obs.updateFctyCsMeterInfoListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-fcty-cs-meter-info-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "유지관리 설비계기정보 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-fcty-dcu-info-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "36 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.obs.selectFctyDcuInfoListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.obs.updateFctyDcuInfoListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-fcty-dcu-info-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "유지관리 설비DCU정보 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-sigong-master-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "37 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.cst.selectSigongMasterListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.cst.updateSigongMasterListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-sigong-master-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "AMI공사관리 공사기본정보 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-sigong-sbcn-co-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "37 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.cst.selectSigongSbcnCoListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.cst.updateSigongSbcnCoListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-sigong-sbcn-co-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "AMI공사관리 공사별 하도급업체 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-sigong-order-new-modem-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "37 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.cst.selectSigongOrderNewModemListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.cst.updateSigongOrderNewModemListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-sigong-order-new-modem-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "AMI공사관리 대상정보_모뎀_신규공사 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-sigong-order-sig-modem-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "37 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.cst.selectSigongOrderSigModemListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.cst.updateSigongOrderSigModemListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-sigong-order-sig-modem-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "AMI공사관리 대상정보_모뎀_신호보강 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-meter-ndl-lst-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "38 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.emr.selectMeterNdlLstListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.emr.updateMeterNdlLstListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-meter-ndl-lst-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "임시조치 전월검침정보(데이터) 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-mtr-mst-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "39 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.selectMtrMstListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.mtr.updateMtrMstListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-mtr-mst-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "계기관리 계기작업공사정보 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-mtr-mst-detail-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "39 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.selectMtrMstDetailListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.mtr.updateMtrMstDetailListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-mtr-mst-detail-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "계기관리 계기작업공사현장정보 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-mtr-inst-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "39 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.selectMtrInstListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.mtr.updateMtrInstListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-mtr-inst-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "계기관리 작업 대상 정보 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-ann-mtr-insp-expr-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "39 0/1 * * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtr.selectAnnMtrInspExprListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.mtr.updateAnnMtrInspExprListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-ann-mtr-insp-expr-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "계기관리 연간대상실효계기목록 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-inln-co-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "8 1 0 * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.fmp.cdm.selectInlnCoListForSend",
"postProcessingSqlId": "com.kdn.mkami.fmp.cdm.updateInlnCoListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-inln-co-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "공통 내선업체 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-sbcn-co-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "8 1 0 * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.fmp.cdm.selectSbcnCoListForSend",
"postProcessingSqlId": "com.kdn.mkami.fmp.cdm.updateSbcnCoListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-sbcn-co-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "공통 하도급사 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-equip-mtrl-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "8 1 0 * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtl.selectEquipMtrlListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.mtl.updateEquipMtrlListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-equip-mtrl-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "자재관리 자재마스터 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-mng-plce-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "8 1 0 * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtl.selectMngPlceListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.mtl.updateMngPlceListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-mng-plce-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "자재관리 자재보관장소 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-pckn-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "8 1 0 * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtl.selectPcknListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.mtl.updatePkcnListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-pckn-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "자재관리 패킹 송신"
},
{
"postmanId": "postman-fox-mkami-dev-oracle-send-mtrl-tp-list",
"taskType": "DB_READ_THEN_SEND",
"action": {
"type": "SCHEDULED",
"cron": "8 1 0 * * *"
},
"message": {
"messageType": "TRANSFER_DB_TO_DB",
"dataSourceId": "ds-oracle",
"sqlId": "com.kdn.mkami.mob.mtl.selectMtrlTpListForSend",
"postProcessingSqlId": "com.kdn.mkami.mob.mtl.updateMtrlTpListTransferDone"
},
"recipientHostId": "fox-ami-dev-cubrid",
"recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-mtrl-tp-list",
"routingHostIdList": [
"fox-ami-dev-cubrid"
],
"description": "자재관리 자재유형 송신"
}
]
}
}

@ -41,11 +41,25 @@ public class DfxAgentRunner implements ApplicationRunner {
// command line 실행 중 --check-config 가 있는 경우 settings.json 을 로드하여 DB 연결, knownAgent 연결 테스트를 진행한다.
// java -jar $AGENT_HOME/lib/dfxagent.jar --setting.check --setting.file=$AGENT_HOME/conf/settings.json &
if(args.containsOption("setting.check")) {
try {
this.checkConfig(args);
}
catch(Exception e) {
System.err.println(e.getLocalizedMessage());
System.exit(2);
}
System.exit(0);
}
else if(args.containsOption("parse.message.file")) {
try {
this.parseMessageFile(args);
}
catch(Exception e) {
System.err.println(e.getLocalizedMessage());
System.exit(2);
}
System.exit(0);
}
}
private void print(String text) {
@ -77,27 +91,32 @@ public class DfxAgentRunner implements ApplicationRunner {
ObjectMapper objectMapper = new ObjectMapper();
String parsedString = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(receiveMessageDto);
outputStream.write(parsedString.getBytes());
if(outputStream == System.out) {
outputStream.flush();
}
else {
outputStream.close();
}
}
catch(FileNotFoundException e) {
this.print("오류가 포함되어 있습니다.");
this.print(e.getLocalizedMessage());
this.print("점검을 종료합니다.");
System.exit(2);
} catch (ClassNotFoundException e) {
}
catch (ClassNotFoundException e) {
this.print("오류가 포함되어 있습니다.");
this.print(e.getLocalizedMessage());
this.print("점검을 종료합니다.");
System.exit(2);
} catch (JsonProcessingException e) {
}
catch (JsonProcessingException e) {
this.print("오류가 포함되어 있습니다.");
this.print(e.getLocalizedMessage());
this.print("점검을 종료합니다.");
} catch (IOException e) {
System.exit(2);
}
catch (IOException e) {
this.print("오류가 포함되어 있습니다.");
this.print(e.getLocalizedMessage());
this.print("점검을 종료합니다.");
} finally {
outputStream.close();
System.exit(2);
}
this.print("-----------------------");
this.print("변환을 종료합니다.");

@ -113,7 +113,7 @@ public class DfxAgentConfiguration {
List<AgentConfigDto.DataSourceConfig> dataSourceConfigList = agentConfigReader.getAgentConfigDto().getDataSourceConfig();
for(AgentConfigDto.DataSourceConfig dataSourceConfig : dataSourceConfigList) {
try {
BasicDataSource dataSource = createBasicDataSource(dataSourceConfig);
BasicDataSource dataSource = this.createBasicDataSource(dataSourceConfig);
SqlSessionFactoryBean sqlSessionFactoryBean = new RefreshableSqlSessionFactoryBean();//new SqlSessionFactoryBean();
org.apache.ibatis.session.Configuration mybatisConfiguration = new org.apache.ibatis.session.Configuration();
mybatisConfiguration.setJdbcTypeForNull(JdbcType.NULL);

@ -13,4 +13,9 @@ logging:
org.springframework.boot: ERROR
com.bsmlab.dfx.agent: DEBUG
com.bsmlab.dfx.agent.DfxAgentApplication: WARN
log4jdbc:
dump:
sql:
resultsettable: false
resultset: false
methodcall: false

Loading…
Cancel
Save