테이블 및 초기 데이터 설치

'03.bootJar' 디렉토리에는 프레임워크 테이블과 초기 데이터를 생성하기 위한 boot jar 파일이 있다. 이 boot jar 파일을 실행하여 설치 과정을 진행할 수 있다. 실행 방법은 터미널 또는 명령 프롬프트를 열고 해당 디렉토리로 이동한 후에 java -jar bxframework-sqlrun-3.x.x.jar 명령을 입력하여 실행하면 된다. 이렇게 하면 필요한 테이블과 초기 데이터가 생성된다.

1. 03.bootJar 디렉토리

해당 디렉토리에는 다음과 같은 파일이 있다.

03.bootJar 디렉토리
파일 설명

bxframework-sqlrun-3.x.x-boot.jar

테이블 및 초기 데이터 생성을 위한 boot jar 파일

application.properties

boot jar 설정 파일

sqlrun_exec_sample.sh

실행 Sample Shell Script

2. SqlRun boot jar 실행

  1. application.properties 설정

    application.properties 파일은 대상 데이터베이스에 대한 설정을 담고 있다. 여기에는 다음과 같은 주요 내용을 설정할 수 있다.

    • url : 대상 데이터베이스에 연결하기 위한 URL을 설정한다.

    • username : 대상 데이터베이스에 접속하기 위한 사용자 이름을 설정한다.

    • password : 대상 데이터베이스에 접속하기 위한 패스워드를 설정한다.

    • vendor : 대상 데이터베이스의 Vendor 정보를 설정한다.

      참고 : 현재 지원하는 DB 벤더는 Oracle, MySql이다.

      다음은 application.properties에 대한 설정 예이다.

                          spring.datasource.driver-class-name=com.mysql.jdbc.Driver
                          #spring.datasource.url must assign by JVM Env
                          spring.datasource.url=jdbc:mysql://cloud.mshome.net:3306/{username}?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false
                          spring.datasource.username={username}
                          spring.datasource.password={password}
      
                          sqlrun.db-vendor=mysql
                          sqlrun.stop-on-error=true
                          # DB Vendor 설정
                          sqlrun.studio.config.database.vendor=mysql
                          sqlrun.studio.config.database.version=5.7.42
                          sqlrun.studio.config.database.dirverClass=com.mysql.jdbc.Driver
                          sqlrun.studio.config.database.host=cloud.mshome.net
                          sqlrun.studio.config.database.port=3306
                          sqlrun.studio.config.database.database=bxcm
                          sqlrun.studio.config.database.user={user}
                          sqlrun.studio.config.database.pwd={password}
                          sqlrun.studio.config.database.jar=mysql-connector-java-5.1.49.jar
                          sqlrun.studio.config.repository.url=http://repositoryIp:port
                          sqlrun.studio.config.repository.user=user
                          sqlrun.studio.config.repository.password=password
                          sqlrun.stop-on-error=true
  2. SqlRun 실행

    application.properties에 설정이 완료가 되었으면 Sample 실행 Shell인 'sqlrun_exec_sample.sh’를 참고하여 실행할 수 있다.

                        $ sh sqlrun_exec_sample.sh
    
                         > application.properties에 필요한 값을 설정한 후에 실행하세요.
                         > Set the required values in application.properties and then run it.
    
                        11:16:35.704 [main] INFO bxframework.sqlrun.BxframeworkSqlrunApplication -- # start sqlrun
    
                          .   ____          _            __ _ _
                         /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
                        ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
                         \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
                          '  |____| .__|_| |_|_| |_\__, | / / / /
                         =========|_|==============|___/=/_/_/_/
    
                         :: Spring Boot ::                (v3.4.0)
    
                        2025-03-06T11:16:36.232+09:00  INFO 17695 --- [           main] b.sqlrun.BxframeworkSqlrunApplication    : Starting BxframeworkSqlrunApplication v3.0.0 using Java 17.0.14 with PID 17695 (/home/ubuntu/bxcm-install-dir/bxframework-sqlrun-3.0.0-boot.jar started by ubuntu in /home/ubuntu/bxcm-install-dir)
                        2025-03-06T11:16:36.234+09:00  INFO 17695 --- [           main] b.sqlrun.BxframeworkSqlrunApplication    : No active profile set, falling back to 1 default profile: "default"
                        2025-03-06T11:16:36.715+09:00  INFO 17695 --- [           main] ptablePropertiesBeanFactoryPostProcessor : Post-processing PropertySource instances
                        2025-03-06T11:16:36.715+09:00  INFO 17695 --- [           main] c.u.j.EncryptablePropertySourceConverter : Skipping PropertySource configurationProperties [class org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource
                        2025-03-06T11:16:36.717+09:00  INFO 17695 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource commandLineArgs [org.springframework.core.env.SimpleCommandLinePropertySource] to EncryptableEnumerablePropertySourceWrapper
                        2025-03-06T11:16:36.718+09:00  INFO 17695 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource systemProperties [org.springframework.core.env.PropertiesPropertySource] to EncryptableMapPropertySourceWrapper
                        2025-03-06T11:16:36.718+09:00  INFO 17695 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableSystemEnvironmentPropertySourceWrapper
                        2025-03-06T11:16:36.718+09:00  INFO 17695 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper
                        2025-03-06T11:16:36.718+09:00  INFO 17695 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource Config resource 'file [application.properties]' via location 'application.properties' [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
                        2025-03-06T11:16:36.718+09:00  INFO 17695 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource applicationInfo [org.springframework.boot.ApplicationInfoPropertySource] to EncryptableMapPropertySourceWrapper
                        2025-03-06T11:16:36.781+09:00  INFO 17695 --- [           main] c.u.j.filter.DefaultLazyPropertyFilter   : Property Filter custom Bean not found with name 'encryptablePropertyFilter'. Initializing Default Property Filter
                        2025-03-06T11:16:36.793+09:00  INFO 17695 --- [           main] c.u.j.r.DefaultLazyPropertyResolver      : Property Resolver custom Bean not found with name 'encryptablePropertyResolver'. Initializing Default Property Resolver
                        2025-03-06T11:16:36.794+09:00  INFO 17695 --- [           main] c.u.j.d.DefaultLazyPropertyDetector      : Property Detector custom Bean not found with name 'encryptablePropertyDetector'. Initializing Default Property Detector
                        Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
                        2025-03-06T11:16:37.072+09:00  INFO 17695 --- [           main] b.sqlrun.BxframeworkSqlrunApplication    : Started BxframeworkSqlrunApplication in 1.206 seconds (process running for 1.655)
                        2025-03-06T11:16:37.075+09:00  INFO 17695 --- [           main] b.sqlrun.BxframeworkSqlrunApplication    : arguments : [[run, --spring.config.location=application.properties]]
                        2025-03-06T11:16:37.076+09:00  INFO 17695 --- [           main] b.sqlrun.BxframeworkSqlrunApplication    : spring.datasource.url : jdbc:mysql://cloud.mshome.net:3306/bxcm300?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false
                        2025-03-06T11:16:37.077+09:00  INFO 17695 --- [           main] b.sqlrun.service.SqlRunService           : Sqlrun Info : SqlRunInfo [dbVendor=mysql, stopOnError=true, sendFullScript=false, encoding=UTF-8, input=SqlrunInput [ddlFiles=null, dmlFiles=null, dir=null]]
                        2025-03-06T11:16:37.077+09:00  INFO 17695 --- [           main] b.sqlrun.service.SqlRunService           : Target DB Vendor : [MYSQL]

3. Sql Script 개별 실행

SqlRun boot jar 실행이 아닌 SQL 도구를 이용하여 DDL과 DML을 실행해야 하는 경우가 있다. 이런 경우에는 boot jar 파일을 압축 해제하여 boot jar내에 있는 sql 파일을 이용하여 실행하거나, SqlRun boot jar 에서 제공하는 command를 이용하여 sql 파일 생성 후 실행하면 된다.

다음은 SqrlRun boot jar 파일내에 있는 sql 파일이다.

            03.bootJar$ jar xvf bxframework-sqlrun-3.0.0-boot.jar | grep "\.sql"
             inflated: BOOT-INF/classes/sql/sample/sample_data.sql
             inflated: BOOT-INF/classes/sql/sample/sample_table_oracle.sql
             inflated: BOOT-INF/classes/sql/sample/sample_table_mysql.sql
             inflated: BOOT-INF/classes/sql/ddl/ddl_mysql.sql
             inflated: BOOT-INF/classes/sql/ddl/ddl_oracle.sql
             inflated: BOOT-INF/classes/sql/dml/data.sql

SqrlRun boot jar 실행 command를 이용하여 sql 파일을 생성 할 수 있다.

            03.bootJar$ java -jar bxframework-sqlrun-3.0.0-boot.jar gen MySql
            11:18:45.682 [main] INFO bxframework.sqlrun.BxframeworkSqlrunApplication -- # start sqlgen

              .   ____          _            __ _ _
             /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
            ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
             \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
              '  |____| .__|_| |_|_| |_\__, | / / / /
             =========|_|==============|___/=/_/_/_/

             :: Spring Boot ::                (v3.4.0)

            2025-03-06T11:18:46.167+09:00  INFO 18831 --- [           main] b.sqlrun.BxframeworkSqlrunApplication    : Starting BxframeworkSqlrunApplication v3.0.0 using Java 17.0.14 with PID 18831 (/home/ubuntu/bxcm-install-dir/bxframework-sqlrun-3.0.0-boot.jar started by ubuntu in /home/ubuntu/bxcm-install-dir)
            2025-03-06T11:18:46.169+09:00  INFO 18831 --- [           main] b.sqlrun.BxframeworkSqlrunApplication    : No active profile set, falling back to 1 default profile: "default"
            2025-03-06T11:18:46.701+09:00  INFO 18831 --- [           main] ptablePropertiesBeanFactoryPostProcessor : Post-processing PropertySource instances
            2025-03-06T11:18:46.702+09:00  INFO 18831 --- [           main] c.u.j.EncryptablePropertySourceConverter : Skipping PropertySource configurationProperties [class org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource
            2025-03-06T11:18:46.704+09:00  INFO 18831 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource commandLineArgs [org.springframework.core.env.SimpleCommandLinePropertySource] to EncryptableEnumerablePropertySourceWrapper
            2025-03-06T11:18:46.704+09:00  INFO 18831 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource systemProperties [org.springframework.core.env.PropertiesPropertySource] to EncryptableMapPropertySourceWrapper
            2025-03-06T11:18:46.704+09:00  INFO 18831 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableSystemEnvironmentPropertySourceWrapper
            2025-03-06T11:18:46.704+09:00  INFO 18831 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper
            2025-03-06T11:18:46.704+09:00  INFO 18831 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource Config resource 'file [application.properties]' via location 'optional:file:./' [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
            2025-03-06T11:18:46.705+09:00  INFO 18831 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource Config resource 'class path resource [application.properties]' via location 'optional:classpath:/' [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
            2025-03-06T11:18:46.705+09:00  INFO 18831 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource applicationInfo [org.springframework.boot.ApplicationInfoPropertySource] to EncryptableMapPropertySourceWrapper
            2025-03-06T11:18:46.788+09:00  INFO 18831 --- [           main] c.u.j.filter.DefaultLazyPropertyFilter   : Property Filter custom Bean not found with name 'encryptablePropertyFilter'. Initializing Default Property Filter
            2025-03-06T11:18:46.804+09:00  INFO 18831 --- [           main] c.u.j.r.DefaultLazyPropertyResolver      : Property Resolver custom Bean not found with name 'encryptablePropertyResolver'. Initializing Default Property Resolver
            2025-03-06T11:18:46.805+09:00  INFO 18831 --- [           main] c.u.j.d.DefaultLazyPropertyDetector      : Property Detector custom Bean not found with name 'encryptablePropertyDetector'. Initializing Default Property Detector
            Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
            2025-03-06T11:18:47.336+09:00  INFO 18831 --- [           main] b.sqlrun.BxframeworkSqlrunApplication    : Started BxframeworkSqlrunApplication in 1.493 seconds (process running for 1.969)
            2025-03-06T11:18:47.343+09:00  INFO 18831 --- [           main] b.sqlrun.BxframeworkSqlrunApplication    : arguments : [[gen, MySql]]
            2025-03-06T11:18:47.344+09:00  INFO 18831 --- [           main] b.sqlrun.BxframeworkSqlrunApplication    : spring.datasource.url : jdbc:mysql://cloud.mshome.net:3306/bxcm300?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false
            2025-03-06T11:18:47.358+09:00  INFO 18831 --- [           main] b.sqlrun.service.SqlGenService           : -- generated file : [/home/ubuntu/bxcm-install-dir/sql/ddl/ddl_mysql.sql]
            2025-03-06T11:18:47.361+09:00  INFO 18831 --- [           main] b.sqlrun.service.SqlGenService           : -- generated file : [/home/ubuntu/bxcm-install-dir/sql/dml/data.sql]
            2025-03-06T11:18:47.362+09:00  INFO 18831 --- [           main] b.sqlrun.BxframeworkSqlrunApplication    : # end sqlgen

            03.bootJar$ ls -al sql/ddl/*
            -rw-rw-r-- 1 ubuntu ubuntu 91749 Mar  6 11:18 sql/ddl/ddl_mysql.sql

            03.bootJar$ ls -al sql/dml/*
            -rw-rw-r-- 1 ubuntu ubuntu 101887 Mar  6 11:18 sql/dml/data.sql

4. 프레임워크 주요 테이블

  1. BXCM 테이블

    • BXCM 테이블 - Online , Batch

      BXCM 온라인, 배치 테이블 리스트
      구분 테이블명 설명 비고

      온라인, 배치

      BXM_TENANT

      BXM테넌트

      BXM_COM_CFG

      BXM설정

      BXM_COM_MSG

      BXM공통메시지

      BXM_SYS_MSG

      BXM시스템메시지

      BXM_TRX_INFO

      BXM온라인거래정보

      BXM_JOB_INFO

      BXM 배치 작업 정보

      BXM_LRA_ACTIONS

      BXM_LRA_ACTIONS

      분산트랜잭션 모티터링

      BXM_LRA_RECOVERIES

      BXM_LRA_RECOVERIES

      분산트랜잭션 리커버리

    • BXCM 테이블 - Spring Batch

      Spring Batch 테이블 리스트
      구분 테이블명 설명 비고

      Spring Batch

      BATCH_JOB_INSTANCE

      배치작업 인스턴스

      BATCH_JOB_EXECUTION

      배치작업 실행정보

      BATCH_JOB_EXECUTION_CONTEXT

      배치작업 실행 컨텍스트 정보

      BATCH_JOB_EXECUTION_PARAMS

      배치작업 실행 파라미터

      BATCH_STEP_EXECUTION

      배치작업 스텝 실행정보

      BATCH_STEP_EXECUTION_CONTEXT

      배치작업 스텝 실행 컨텍스트 정보

      BATCH_JOB_INSTANCE_EXT

      배치작업 인스턴스 확장

      BATCH_JOB_EXECUTION_EXT

      배치작업 실행정보 확장

      BATCH_STEP_EXECUTION_EXT

      배치작업 스텝 실행정보 확장

    • BXCM 테이블 - Log

      BXCM Log 테이블 리스트
      구분 테이블명 설명 비고

      Log

      BXM_LOG_SVC

      BXM서비스로그

      BXM_LOG_DETAIL

      BXM서비스로그상세

      BXM_LOG_IMG

      BXM이미지로그

      BXM_LOG_ERR

      BXM에러로그

    • BXCM 테이블 - Web Admin

      BXCM Web Admin 테이블 리스트
      구분 테이블명 설명 비고

      Web Admin

      BXM_USER_INFO

      BXM 사용자

      BXM_USER_ROLE

      BXM 역할

      BXM_USER_ROLE_AUTH_RLTON

      BXM 역할 권한 관계

      BXM_USER_AUTH

      BXM 권한

      BXM_USER_ROLE_MENU_RLTON

      BXM 역할 ADMIN메뉴 관계

      BXM_USER_MENU

      BXM ADMIN 메뉴

      BXM_USER_ACTION_AUTH

      BXM ADMIN 동작 권한

      BXM_USER_FLD_AUTH

      BXM ADMIN 필드 권한

      BXM_COM_CD

      BXM 공통 코드

      BXM_COM_CD_DETAIL

      BXM 공통 코드 상세

    • BXCM 테이블 - BXCM Studio

      BXCM Studio 테이블 리스트
      구분 테이블명 설명 비고

      Studio

      BXM_DOMAIN

      BXM 도메인

      운영서버 삭제가능

      BXM_STUDIO_CFG

      BXM Studio 환경 설정

      BXM_OMM_META

      OMM META 정보

      BXM_OMM_META_VERSION

      META 시스템 버젼

    • BXM Sequence - Spring Batch

      Spring Batch Sequence 리스트
      구분 테이블명 설명 비고

      Spring Batch

      BATCH_JOB_EXECUTION_SEQ

      배치작업 실행 Sequence

      BATCH_JOB_SEQ

      배치작업 Sequence

      BATCH_STEP_EXECUTION_SEQ

      배치스텝실행 Sequence

SWLab Bankware Global
  • 전체
  • BXM
  • BXCM
  • BXCP
  • BXI
제품 선택 시 더 정확한 매뉴얼 가이드를 제공해드립니다.

Copyright© Bankwareglobal All Rights Reserved.