diff --git a/pom.xml b/pom.xml index 2ddf878c..23bc8fb8 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ cokr.xit.app sgg-setting - 10000 + 50000 sgg-setting sgg-setting jar @@ -39,6 +39,11 @@ + + cokr.xit.boot + xit-base-starter + 23.04.01-SNAPSHOT + diff --git a/src/main/java/cork/xit/fims/DatabaseConfig.java b/src/main/java/cork/xit/fims/DatabaseConfig.java new file mode 100644 index 00000000..90f4030a --- /dev/null +++ b/src/main/java/cork/xit/fims/DatabaseConfig.java @@ -0,0 +1,122 @@ +package cork.xit.fims; + +import javax.annotation.Resource; +import javax.sql.DataSource; + +import org.apache.ibatis.mapping.VendorDatabaseIdProvider; +import org.aspectj.lang.annotation.Aspect; +import org.egovframe.rte.psl.dataaccess.mapper.MapperConfigurer; +import org.mybatis.spring.SqlSessionFactoryBean; +import org.springframework.aop.Advisor; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.EnableAspectJAutoProxy; +import org.springframework.jdbc.datasource.DataSourceTransactionManager; +import org.springframework.transaction.annotation.EnableTransactionManagement; +import org.springframework.transaction.interceptor.TransactionInterceptor; + +import cokr.xit.foundation.boot.AbstractDatasource; +import cokr.xit.foundation.boot.AbstractTransaction; +import cokr.xit.foundation.boot.DatasourceConfig; + +public class DatabaseConfig { + public static class FimsDatasource extends DatasourceConfig { + @Override + @ConfigurationProperties(prefix = "spring.datasource.hikari.fims") + public DataSource dataSource() { + return super.dataSource(); + } + + @Override + protected String[] mapperLocationPatterns() { + return new String[] { + "classpath:sql/mapper/base/*.xml", + "classpath:sql/mapper/interfaces/*.xml", + "classpath:sql/mapper/fims/**/*.xml", + }; + } + + @Override + protected String mapperBasePackages() { + return "cokr.xit.base;cokr.xit.interfaces;cokr.xit.fims"; + } + } + + public static class CpDatasource extends AbstractDatasource { + private static final String SQL_SESSION = "cpSession"; + + @Override + @Bean("cpDataSource") + @ConfigurationProperties(prefix = "spring.datasource.hikari.cp") + public DataSource dataSource() { + return super.dataSource(); + } + + @Override + @Bean(SQL_SESSION) + public SqlSessionFactoryBean sqlSession() { + return super.sqlSession(); + } + + @Override + protected String sqlSessionName() { + return SQL_SESSION; + } + + @Override + protected String[] mapperLocationPatterns() { + return new String[] { + "classpath:sql/mapper/base/utility.xml", + "classpath:sql/mapper/cp/*.xml", + }; + } + + @Override + protected String mapperBasePackages() { + return "cokr.xit.cp"; + } + + @Override + @Bean("cpMapperConfigurer") + public MapperConfigurer mapperConfigurer() { + return super.mapperConfigurer(); + } + + @Override + @Bean("cpIdProvider") + public VendorDatabaseIdProvider databaseIdProvider() { + return super.databaseIdProvider(); + } + } + + @Configuration + @Aspect + @EnableTransactionManagement + @EnableAspectJAutoProxy(proxyTargetClass = true) + public static class CpTransaction extends AbstractTransaction { + @Override + @Resource(name = "cpDataSource") + public void setDataSource(DataSource dataSource) { + super.setDataSource(dataSource); + } + + @Override + @Bean("cpTxManager") + public DataSourceTransactionManager txManager() { + return super.txManager(); + } + + @Override + @Bean("cpTxAdvice") + public TransactionInterceptor txAdvice() { + return super.txAdvice(); + } + + @Override + @Bean("cpTxAdvisor") + public Advisor txAdvisor() { + return super.txAdvisor(); + } + } +} diff --git a/src/main/java/cork/xit/fims/SpringBootApplicationBridge.java b/src/main/java/cork/xit/fims/SpringBootApplicationBridge.java new file mode 100644 index 00000000..3258e3e3 --- /dev/null +++ b/src/main/java/cork/xit/fims/SpringBootApplicationBridge.java @@ -0,0 +1,20 @@ +package cork.xit.fims; + +import org.springframework.boot.autoconfigure.ImportAutoConfiguration; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.FilterType; + +import cokr.xit.base.boot.XitBaseApplication; +import cokr.xit.foundation.boot.DatasourceConfig; + +@ImportAutoConfiguration({ +DatabaseConfig.FimsDatasource.class, +DatabaseConfig.CpDatasource.class, +DatabaseConfig.CpTransaction.class +}) +@ComponentScan( +excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,classes = {DatasourceConfig.class}) +) +public class SpringBootApplicationBridge extends XitBaseApplication { + +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml deleted file mode 100644 index 8e0ef512..00000000 --- a/src/main/resources/application.yml +++ /dev/null @@ -1,56 +0,0 @@ -server: - shutdown: graceful - port: 9078 - servlet: - context-path: / - -# ssl: -# enabled: true -# key-alias: fimskeystore -# key-store: classpath:fimskeystore.pkcs12 -# key-store-password: 'Xit5811807@)@#' -# key-password: 'Xit5811807@)@#' -# trust-store: classpath:fimstrust.pkcs12 -# trust-store-password: 'Xit5811807@)@#' - -# tomcat: -# remoteip: -# protocol-header-https-value: https - -spring: - application: - name: fims - main: - allow-bean-definition-overriding: true -# web-application-type: SERVLET - sql: - init: - platform: mariadb - datasource: - hikari: - driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - jdbc-url: jdbc:log4jdbc:mariadb://211.119.124.9:4407/fims?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Seoul&useSSL=false&autocommit=false - username: fimsweb - password: fimsweb!@ - auto-commit: false - mvc: - static-path-pattern: /resources/**,/webjars/**,/files/** - web: - resources: - static-locations: /resources/,classpath:/META-INF/resources/webjars/,file:files/ - -messageSource: - basenames: - - classpath:message/message-common - - classpath:message/authentication-message - - classpath:org/egovframe/rte/fdl/property/messages/properties - -propertyService: - properties: - - tempDir: C:\temp - - pageUnit: 10 - - pageSize: 10 - - permitAccess: /intf/**/* - extFileName: - - encoding: UTF-8 - filename: classpath*:intf-conf/xit-lvis.properties diff --git a/src/main/resources/intf-conf/disabled-parking.conf b/src/main/resources/intf-conf/disabled-parking.conf deleted file mode 100644 index 6e5d80f6..00000000 --- a/src/main/resources/intf-conf/disabled-parking.conf +++ /dev/null @@ -1,16 +0,0 @@ -{ - "template": "template/disabled-parking-request.xml", /* 장애인 표지 조회를 위한 요청 xml 템플릿의 클래스패스 상의 경로 */ - - "serviceUrl": "http://localhost:9078/rid/ynservice/swsdn/DisabledParkingYnService", /* 장애인 표지 조회 모의 서비스 url */ - "targetServer": "SVR1311000030", /* 장애인 표지 조회 서버인증서 아이디 */ - - "request": { /* 요청 xml의 파라미터 시작과 끝 태그 */ - "start": "", - "end": "" - }, - - "response": { /* 응답 xml의 데이터 시작과 끝 태그 */ - "start": "", - "end": "" - } -} \ No newline at end of file diff --git a/src/main/resources/intf-conf/file-job.conf b/src/main/resources/intf-conf/file-job.conf deleted file mode 100644 index 36106eba..00000000 --- a/src/main/resources/intf-conf/file-job.conf +++ /dev/null @@ -1,55 +0,0 @@ -{ - "dirs": { - "receive": "files/ESB_AGENT/RCV", /* 수신 파일 최상위 디렉토리 */ - "send": "files/ESB_AGENT/SND", /* 전송 파일 최상위 디렉토리 */ - - "working": "files/interface/work", /* 파일 작업 최상위 디렉토리 */ - "success": "files/interface/success", /* 작업 완료한 파일의 최상위 디렉토리 */ - "fail": "files/interface/fail" /* 작업 실패한 파일의 최상위 디렉토리 */ - }, - - "dirCodes": { - "lntris": "1741000NIS", /* 차세대 지방세외수입 시스템 */ - "smg": "CG131000000768", /* 국민신문고 기관코드 */ - "epost": "CG144523401150" /* epost 기관코드 */ - }, - - "defaults": { - "charset": "euc-kr", - "fetchSize": 50, - "workSize": 50 - }, - - "jobs": [ - { /* 국민신문고 수신 */ - "name": "smg-receive", - "dirCode": "smg", /* <-- dirCodes */ - "infoType": "010", - "alert": "http://localhost:9078/intf/fims/smg/petition/receive.do" /* 업무 통보 url */ - }, - { /* 국민신문고 전송 */ - "name": "smg-send", - "dirCode": "smg", /* <-- dirCodes */ - "alert": "http://localhost:9078/intf/fims/smg/petition/reply.do" /* 업무 통보 url */ - }, - - { /* epost 전자우편 신청 전송 */ - "name": "epost-send-request", - "dirCode": "epost", /* <-- dirCodes */ - - "conOrg": "PJCT", /* 외부기관 구분코드 */ - "rceptId": "40219", /* 접수우체국 국기호 */ - "expiryDays": 10, /* 배달 만료 일수 */ - - "attachmentDir": "files/interface/attachment/epost", /* 원본 첨부파일 디렉토리 경로 */ - "txtFilename": "POSDF5$send_{yyyyMMddHHmmssSSS}.txt", - "zipFilename": "POSDF5${conKey}.zip" - }, - - { /* epost 전자우편 신청 수신 결과 */ - "name": "epost-receive-result", - "dirCode": "epost", /* <-- dirCodes */ - "alert": "http://localhost:9078/api/epost/result/receive.do" /* 업무 통보 url */ - } - ] -} \ No newline at end of file diff --git a/src/main/resources/intf-conf/gpki.conf b/src/main/resources/intf-conf/gpki.conf deleted file mode 100644 index 90a29829..00000000 --- a/src/main/resources/intf-conf/gpki.conf +++ /dev/null @@ -1,25 +0,0 @@ -{ - "license": "C:\\GPKI\\Lic", /* 이용기관 GPKI API 라이센스 디렉토리 */ - - "charset": "UTF-8", /* 문자셋 */ - - "server": { - "local": "SVR4060262001", /* 이용기관 서버 CN */ - "targets": "SVR1311000030" /* 대상기관 서버인증서 아이디, 여러 개일 경우 컴마(,)로 구분 */ - }, - - "ldapUrl": "ldap://10.1.7.118:389/cn=", /* 대상기관 인증서 다운로드를 위한 행정망 LDAP URL */ - /*"ldapUrl": "ldap://152.99.57.127:389/cn=", 대상기관 인증서 다운로드를 위한 인터넷망 LDAP URL */ - "certDir": "C:\\GPKI\\Certificate\\class1", /* 서버 인증서, 키 저장 디렉토리 */ - - "env": { /* 이용기관 서버 인증서 */ - "certFile": "SVR4060262001_env.cer", - "privateKeyFile": "SVR4060262001_env.key", - "privateKeyPassword": "wkddodls3322!" - }, - "sig": { /* 이용기관 서버 전자서명 */ - "certFile": "SVR4060262001_sig.cer", - "privateKeyFile": "SVR4060262001_sig.key", - "privateKeyPassword": "wkddodls3322!" - } -} \ No newline at end of file diff --git a/src/main/resources/intf-conf/lntris.conf b/src/main/resources/intf-conf/lntris.conf deleted file mode 100644 index 0ea855a4..00000000 --- a/src/main/resources/intf-conf/lntris.conf +++ /dev/null @@ -1,20 +0,0 @@ -{ - "useDatabase": true, - "sendRequest": false, - - "locals": [ - { - "organization": "4060000", /* 지역 자치단체 코드(7자리) */ - "systems": ["DPV","PVS","BPV","ECA","PES"] /* 지역 시스템 코드(3자리) */ - } - ], - - "remote": { - "organization": "1741000", /* 지방세외수입 기관 코드(7자리) */ - "systems": ["NIS"], /* 지방세외수입 시스템 코드(3자리) */ - "urls": { - "basic": "http://localhost:9079/mediate/ltis", /* 연계(개별) url */ - "special": "http://localhost:9079/mediate/ltis" /* 연계(특화) url */ - } - } -} \ No newline at end of file diff --git a/src/main/resources/intf-conf/xit-lvis.properties b/src/main/resources/intf-conf/xit-lvis.properties deleted file mode 100644 index 0c32328a..00000000 --- a/src/main/resources/intf-conf/xit-lvis.properties +++ /dev/null @@ -1,34 +0,0 @@ -#\uc2dc\uad70\uad6c\ucf54\ub4dc(\ud544\uc218) -lvis.sigungu.code=41480 -#\ub2f4\ub2f9\uc790 \uc8fc\ubbfc\ub4f1\ub85d\ubc88\ud638 -lvis.charger.ihinum= -#\ub2f4\ub2f9\uc790 IP \uc5b4\ub4dc\ub808\uc2a4 -lvis.charger.ip_adres= -#\ub2f4\ub2f9\uc790\uba85 -lvis.charger.nm=\uae40\ud30c\uc8fc -#\ub2f4\ub2f9\uc790 \uc5f0\ub77d\ucc98 -lvis.charger.wrc_telno=031-940-0000 - -#\uc815\ubcf4\uc2dc\uc2a4\ud15c ID(\ud544\uc218) -lvis.info_sys.id=41-000 -#\uc815\ubcf4\uc2dc\uc2a4\ud15c IP(\ud544\uc218) -lvis.info_sys.ip=101.0.115.13 -#\uc815\ubcf4\uc2dc\uc2a4\ud15c MAC \uc5b4\ub4dc\ub808\uc2a4 -lvis.info_sys.macaddress=EC:EB:B8:97:F2:14 - -#\uc554\ud638\ud654\ud0a4 -lvis.enc.key=0BCE7F19897CEA91 -#\uc554\ud638\ud654\ud0a4 \uadf8\ub8f9 -lvis.enc.key_group=1 -#\uc554\ud638\ud654\ud0a4 \ubc88\ud638 -lvis.enc.key_no=1 - -#lvis \uc0ac\uc6a9 \uc11c\ube44\uc2a4 (production || test || local) -lvis.host.active=production -#lvis \uc6b4\uc601 \uc11c\ube44\uc2a4 \uc8fc\uc18c -lvis.host.production=http://211.119.124.9:9079/lvis/services/WsFrontController -#lvis \ud14c\uc2a4\ud2b8 \uc11c\ube44\uc2a4 \uc8fc\uc18c -lvis.host.test=http://211.119.124.9:9079/lvis/services/WsFrontController - -#\uc790\ub3d9\ucc28 \uae30\ubcf8\uc0ac\ud56d \uc870\ud68c \ub85c\uadf8 \uc800\uc7a5 \uc5ec\ubd80(true || false) -lvis.log.basicInfo=true \ No newline at end of file diff --git a/src/main/resources/log4jdbc.log4j2.properties b/src/main/resources/log4jdbc.log4j2.properties deleted file mode 100644 index 3b8ff2bf..00000000 --- a/src/main/resources/log4jdbc.log4j2.properties +++ /dev/null @@ -1,4 +0,0 @@ -log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator - -log4jdbc.dump.sql.maxlinelength=0 -log4jdbc.drivers=org.mariadb.jdbc.Driver diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml deleted file mode 100644 index fd7a1c5c..00000000 --- a/src/main/resources/logback-spring.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - ${LOG_PATTERN} - - - - - ${LOG_PATH}/${LOG_FILE_NAME}.log - - ${LOG_PATTERN} - - - - - ${LOG_PATH}/${LOG_FILE_NAME}.%d{yyyy-MM-dd}_%i.log - - 10MB - - - 30 - - - - - - - error - ACCEPT - DENY - - - ${LOG_PATH}/${ERR_LOG_FILE_NAME}.log - - ${LOG_PATTERN} - - - - - ${LOG_PATH}/${ERR_LOG_FILE_NAME}.%d{yyyy-MM-dd}_%i.log - - - 10MB - - - 60 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/spring/context-scheduler.xml b/src/main/resources/spring/context-scheduler.xml deleted file mode 100644 index 17b064f8..00000000 --- a/src/main/resources/spring/context-scheduler.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/ssl/fims.cer b/src/main/resources/ssl/fims.cer deleted file mode 100644 index 143eae22..00000000 --- a/src/main/resources/ssl/fims.cer +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDTTCCAjWgAwIBAgIEWHXwUzANBgkqhkiG9w0BAQsFADBXMQswCQYDVQQGEwJL -UjEOMAwGA1UECBMFc2VvdWwxDjAMBgNVBAcTBXNlb3VsMQwwCgYDVQQKEwNYSVQx -DDAKBgNVBAsTA1hJVDEMMAoGA1UEAxMDWElUMB4XDTIzMDgwMjA3MTgwNloXDTMz -MDczMDA3MTgwNlowVzELMAkGA1UEBhMCS1IxDjAMBgNVBAgTBXNlb3VsMQ4wDAYD -VQQHEwVzZW91bDEMMAoGA1UEChMDWElUMQwwCgYDVQQLEwNYSVQxDDAKBgNVBAMT -A1hJVDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIT8O536wHkjPIxF -49iHb/nHt8ZAkBmV52OFeHVO2fkWxdcx9hh2R8ZvzThyE+eW8jXXU38l0+8nIuAA -n8j0/gRlYpGQ8IfFVrIS7G5fpOhdTb0LyHRGxzxuEHFYbNg1NNW00UWLcHyhDVTw -NACxJtVOCpMGqDWkUHw1EZmqCInoxh4791IJWIgipwBQ/oj2V/ibQC4SWCq24yIL -DPWWEwFTAYhFIArkRV24lBnAlu8EBUPc07ivbYgp/Sbmlx1MlewhrwCh6YTvUT8x -tbFEURlGQObKA2seZaBOGy4dze+kEEMphxLeYeXEj9zftcU/nFGBVCGd49D8FlUZ -WGsJHsMCAwEAAaMhMB8wHQYDVR0OBBYEFP2V1RuYumVZkyRSf+MO/2x6RH+HMA0G -CSqGSIb3DQEBCwUAA4IBAQA2/ZMEgngo/shBbclgB9AI+pQjVkGPOW8mbM66e94K -98pI9dl5pwSQQIyiIWP84hAsxj+zlCFsC/80Dsqkr0bsoOhhy4UU5A6LeD7u0doT -EMU9U5tuT1LZN3Pl/tHJdLNw+M7QnGf4ST4XBqryKfHQy82gaXdvZ1HyQXL1ehkX -SbTDEYCSZ7U3qLZr2KhB+mGlNTLym7EANqVns5x4ee0kasONd5rOvnQSCL4/PpG/ -ig2sUCwHe24KXl5rjBNgTcTbFPdvWexqVXuNjgZx8n87mDtY3y4hWeWyI20tfiMG -2jsDEgw8Gs20yGgCEYKr3HU02mKxGxppQHNGOjOaKOvp ------END CERTIFICATE----- diff --git a/src/main/resources/ssl/fimskeystore.pkcs12 b/src/main/resources/ssl/fimskeystore.pkcs12 deleted file mode 100644 index 356f172a..00000000 Binary files a/src/main/resources/ssl/fimskeystore.pkcs12 and /dev/null differ diff --git a/src/main/resources/ssl/fimstrust.pkcs12 b/src/main/resources/ssl/fimstrust.pkcs12 deleted file mode 100644 index 35a38adb..00000000 Binary files a/src/main/resources/ssl/fimstrust.pkcs12 and /dev/null differ diff --git a/src/main/resources/ssl/keystore b/src/main/resources/ssl/keystore deleted file mode 100644 index 4b56bd11..00000000 Binary files a/src/main/resources/ssl/keystore and /dev/null differ diff --git a/src/main/resources/template/disabled-parking-request.xml b/src/main/resources/template/disabled-parking-request.xml deleted file mode 100644 index a19ae321..00000000 --- a/src/main/resources/template/disabled-parking-request.xml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - DisabledParkingYnService - 4060404CMC - SVR1311000030 - {transactionID} - - - -
- - - 4060000 - ERPTC901SSI638W22183 - {carsNo} - - -
\ No newline at end of file diff --git a/src/main/resources/xit-crypto.conf b/src/main/resources/xit-crypto.conf deleted file mode 100644 index 57cd98a0..00000000 --- a/src/main/resources/xit-crypto.conf +++ /dev/null @@ -1,30 +0,0 @@ -{ "enabled": true, - "cryptoDefs": [ - { "name": "aria", - "class": "cokr.xit.base.crypto.bean.ARIA", - "settings": { - "key": "Copyright (c) 2015 - (주)엑스아이티", - "algorithm": "SHA-256", - "blockSize": 1024 - } - } - , - { "name": "xit-aria", - "class": "cokr.xit.base.crypto.bean.XitAria", - "settings": { - "charset": "EUC-KR", - "key": "Copyright (c) 2015 - (주)엑스아이티" - } - } - ], - "targetValues": [ - { "name": "주민등록번호", - "mapKeys": [ - "RTPYR_NO", "rtpyrNo", //납부자번호 - "MBER_SE_NO", "mber_se_no", "owner_mber_no" // 대표소유자회원번호 - ], - "objectProperties": ["rtpyrNo", "mber_se_no"], - "cryptoDefs": ["aria"] - } - ] -} \ No newline at end of file diff --git a/src/main/resources/xit-syslog.conf b/src/main/resources/xit-syslog.conf deleted file mode 100644 index 802c0439..00000000 --- a/src/main/resources/xit-syslog.conf +++ /dev/null @@ -1,24 +0,0 @@ -{ - "exclude": { - "classes": [], - "methods": [] - }, - - "personalFields": [ - { "name": "주민등록번호", - "code": "", - "mapKeys": ["RTPYR_NO"], - "objectProperties": [] - }, - { "name": "계좌번호", - "code": "", - "mapKeys": [], - "objectProperties": [] - }, - { "name": "주소", - "code": "", - "mapKeys": [], - "objectProperties": [] - } - ] -} \ No newline at end of file