diff --git a/mens-api/src/main/resources/config/application-jpa.yml b/mens-api/src/main/resources/config/application-jpa.yml deleted file mode 100644 index 0ea57be..0000000 --- a/mens-api/src/main/resources/config/application-jpa.yml +++ /dev/null @@ -1,52 +0,0 @@ -#----------------------------------------------------------------------- -# JPA 설정 -#----------------------------------------------------------------------- - -app: - # jpa 활성 여부 - jpa: - enabled: false - -#spring: -# jpa: -# database-platform: org.hibernate.dialect.MySQL5InnoDBDialect -# # 템플릿 view 화면의 렌더링이 끝날 때 까지 Lazy fetch 가 가능하도록 해주는 속성 -# open-in-view: false -# generate-ddl: false -# show-sql: true -# properties: -# order_inserts: true -# order_updates: true -# default_batch_fetch_size: ${chunkSize:100} -# current_session_context_class: org.springframework.orm.hibernate5.SpringSessionContext -# implicit_naming_strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy -# physical_naming_strategy: kr.xit.core.spring.config.support.LowercaseSnakePhysicalNamingStrategy -# hibernate: -# hbm2ddl: -# auto: none -# import_files_sql_extractor: org.hibernate.tool.hbm2ddl.MultipleLinesSqlCommandExtractor -# format_sql: true -# use_sql_comments: false -# jdbc: -# batch_size: 20 -# lob: -# # postgres 사용시 createLob() 미구현 경고 삭제 -# non_contextual_creation: true -# # Jdbc 환경구성을 하는 과정에서 Default Metadata를 사용할 지 여부 -# temp: -# use_jdbc_metadata_defaults: false - -# ================================================================================================================== -# JPA logging lib setting -# ================================================================================================================== -decorator: - datasource: - p6spy: - # profiles 별로 정의 - #enable-logging: true - multiline: true - logging: slf4j - custom-appender-class: com.p6spy.engine.spy.appender.Slf4JLogger - log-format: com.xit.core.config.support.P6spySqlFormatConfiguration - tracing: - include-parameter-values: true diff --git a/mens-batch/document/batch-schema-mysql.sql b/mens-batch/document/batch-schema-mysql.sql index 1a5d87b..8bf0c2f 100644 --- a/mens-batch/document/batch-schema-mysql.sql +++ b/mens-batch/document/batch-schema-mysql.sql @@ -1,101 +1,101 @@ --- Autogenerated: do not edit this file +-- autogenerated: do not edit this file -CREATE TABLE BATCH_JOB_INSTANCE ( - JOB_INSTANCE_ID BIGINT NOT NULL PRIMARY KEY , - VERSION BIGINT , - JOB_NAME VARCHAR(100) NOT NULL, - JOB_KEY VARCHAR(32) NOT NULL, - constraint JOB_INST_UN unique (JOB_NAME, JOB_KEY) -) ENGINE=InnoDB; +create table batch_job_instance ( + job_instance_id bigint not null primary key , + version bigint , + job_name varchar(100) not null, + job_key varchar(32) not null, + constraint job_inst_un unique (job_name, job_key) +) engine=innodb; -CREATE TABLE BATCH_JOB_EXECUTION ( - JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , - VERSION BIGINT , - JOB_INSTANCE_ID BIGINT NOT NULL, - CREATE_TIME DATETIME(6) NOT NULL, - START_TIME DATETIME(6) DEFAULT NULL , - END_TIME DATETIME(6) DEFAULT NULL , - STATUS VARCHAR(10) , - EXIT_CODE VARCHAR(2500) , - EXIT_MESSAGE VARCHAR(2500) , - LAST_UPDATED DATETIME(6), - JOB_CONFIGURATION_LOCATION VARCHAR(2500) NULL, - constraint JOB_INST_EXEC_FK foreign key (JOB_INSTANCE_ID) - references BATCH_JOB_INSTANCE(JOB_INSTANCE_ID) -) ENGINE=InnoDB; +create table batch_job_execution ( + job_execution_id bigint not null primary key , + version bigint , + job_instance_id bigint not null, + create_time datetime(6) not null, + start_time datetime(6) default null , + end_time datetime(6) default null , + status varchar(10) , + exit_code varchar(2500) , + exit_message varchar(2500) , + last_updated datetime(6), + job_configuration_location varchar(2500) null, + constraint job_inst_exec_fk foreign key (job_instance_id) + references batch_job_instance(job_instance_id) +) engine=innodb; -CREATE TABLE BATCH_JOB_EXECUTION_PARAMS ( - JOB_EXECUTION_ID BIGINT NOT NULL , - TYPE_CD VARCHAR(6) NOT NULL , - KEY_NAME VARCHAR(100) NOT NULL , - STRING_VAL VARCHAR(250) , - DATE_VAL DATETIME(6) DEFAULT NULL , - LONG_VAL BIGINT , - DOUBLE_VAL DOUBLE PRECISION , - IDENTIFYING CHAR(1) NOT NULL , - constraint JOB_EXEC_PARAMS_FK foreign key (JOB_EXECUTION_ID) - references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) -) ENGINE=InnoDB; +create table batch_job_execution_params ( + job_execution_id bigint not null , + type_cd varchar(6) not null , + key_name varchar(100) not null , + string_val varchar(250) , + date_val datetime(6) default null , + long_val bigint , + double_val double precision , + identifying char(1) not null , + constraint job_exec_params_fk foreign key (job_execution_id) + references batch_job_execution(job_execution_id) +) engine=innodb; -CREATE TABLE BATCH_STEP_EXECUTION ( - STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , - VERSION BIGINT NOT NULL, - STEP_NAME VARCHAR(100) NOT NULL, - JOB_EXECUTION_ID BIGINT NOT NULL, - START_TIME DATETIME(6) NOT NULL , - END_TIME DATETIME(6) DEFAULT NULL , - STATUS VARCHAR(10) , - COMMIT_COUNT BIGINT , - READ_COUNT BIGINT , - FILTER_COUNT BIGINT , - WRITE_COUNT BIGINT , - READ_SKIP_COUNT BIGINT , - WRITE_SKIP_COUNT BIGINT , - PROCESS_SKIP_COUNT BIGINT , - ROLLBACK_COUNT BIGINT , - EXIT_CODE VARCHAR(2500) , - EXIT_MESSAGE VARCHAR(2500) , - LAST_UPDATED DATETIME(6), - constraint JOB_EXEC_STEP_FK foreign key (JOB_EXECUTION_ID) - references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) -) ENGINE=InnoDB; +create table batch_step_execution ( + step_execution_id bigint not null primary key , + version bigint not null, + step_name varchar(100) not null, + job_execution_id bigint not null, + start_time datetime(6) not null , + end_time datetime(6) default null , + status varchar(10) , + commit_count bigint , + read_count bigint , + filter_count bigint , + write_count bigint , + read_skip_count bigint , + write_skip_count bigint , + process_skip_count bigint , + rollback_count bigint , + exit_code varchar(2500) , + exit_message varchar(2500) , + last_updated datetime(6), + constraint job_exec_step_fk foreign key (job_execution_id) + references batch_job_execution(job_execution_id) +) engine=innodb; -CREATE TABLE BATCH_STEP_EXECUTION_CONTEXT ( - STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, - SHORT_CONTEXT VARCHAR(2500) NOT NULL, - SERIALIZED_CONTEXT TEXT , - constraint STEP_EXEC_CTX_FK foreign key (STEP_EXECUTION_ID) - references BATCH_STEP_EXECUTION(STEP_EXECUTION_ID) -) ENGINE=InnoDB; +create table batch_step_execution_context ( + step_execution_id bigint not null primary key, + short_context varchar(2500) not null, + serialized_context text , + constraint step_exec_ctx_fk foreign key (step_execution_id) + references batch_step_execution(step_execution_id) +) engine=innodb; -CREATE TABLE BATCH_JOB_EXECUTION_CONTEXT ( - JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, - SHORT_CONTEXT VARCHAR(2500) NOT NULL, - SERIALIZED_CONTEXT TEXT , - constraint JOB_EXEC_CTX_FK foreign key (JOB_EXECUTION_ID) - references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) -) ENGINE=InnoDB; +create table batch_job_execution_context ( + job_execution_id bigint not null primary key, + short_context varchar(2500) not null, + serialized_context text , + constraint job_exec_ctx_fk foreign key (job_execution_id) + references batch_job_execution(job_execution_id) +) engine=innodb; -CREATE TABLE BATCH_STEP_EXECUTION_SEQ ( - ID BIGINT NOT NULL, - UNIQUE_KEY CHAR(1) NOT NULL, - constraint UNIQUE_KEY_UN unique (UNIQUE_KEY) -) ENGINE=InnoDB; +create table batch_step_execution_seq ( + id bigint not null, + unique_key char(1) not null, + constraint unique_key_un unique (unique_key) +) engine=innodb; -INSERT INTO BATCH_STEP_EXECUTION_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_STEP_EXECUTION_SEQ); +insert into batch_step_execution_seq (id, unique_key) select * from (select 0 as id, '0' as unique_key) as tmp where not exists(select * from batch_step_execution_seq); -CREATE TABLE BATCH_JOB_EXECUTION_SEQ ( - ID BIGINT NOT NULL, - UNIQUE_KEY CHAR(1) NOT NULL, - constraint UNIQUE_KEY_UN unique (UNIQUE_KEY) -) ENGINE=InnoDB; +create table batch_job_execution_seq ( + id bigint not null, + unique_key char(1) not null, + constraint unique_key_un unique (unique_key) +) engine=innodb; -INSERT INTO BATCH_JOB_EXECUTION_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_JOB_EXECUTION_SEQ); +insert into batch_job_execution_seq (id, unique_key) select * from (select 0 as id, '0' as unique_key) as tmp where not exists(select * from batch_job_execution_seq); -CREATE TABLE BATCH_JOB_SEQ ( - ID BIGINT NOT NULL, - UNIQUE_KEY CHAR(1) NOT NULL, - constraint UNIQUE_KEY_UN unique (UNIQUE_KEY) -) ENGINE=InnoDB; +create table batch_job_seq ( + id bigint not null, + unique_key char(1) not null, + constraint unique_key_un unique (unique_key) +) engine=innodb; -INSERT INTO BATCH_JOB_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_JOB_SEQ); +insert into batch_job_seq (id, unique_key) select * from (select 0 as id, '0' as unique_key) as tmp where not exists(select * from batch_job_seq); diff --git a/mens-batch/src/main/resources/config/application-jpa.yml b/mens-batch/src/main/resources/config/application-jpa.yml deleted file mode 100644 index 0ea57be..0000000 --- a/mens-batch/src/main/resources/config/application-jpa.yml +++ /dev/null @@ -1,52 +0,0 @@ -#----------------------------------------------------------------------- -# JPA 설정 -#----------------------------------------------------------------------- - -app: - # jpa 활성 여부 - jpa: - enabled: false - -#spring: -# jpa: -# database-platform: org.hibernate.dialect.MySQL5InnoDBDialect -# # 템플릿 view 화면의 렌더링이 끝날 때 까지 Lazy fetch 가 가능하도록 해주는 속성 -# open-in-view: false -# generate-ddl: false -# show-sql: true -# properties: -# order_inserts: true -# order_updates: true -# default_batch_fetch_size: ${chunkSize:100} -# current_session_context_class: org.springframework.orm.hibernate5.SpringSessionContext -# implicit_naming_strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy -# physical_naming_strategy: kr.xit.core.spring.config.support.LowercaseSnakePhysicalNamingStrategy -# hibernate: -# hbm2ddl: -# auto: none -# import_files_sql_extractor: org.hibernate.tool.hbm2ddl.MultipleLinesSqlCommandExtractor -# format_sql: true -# use_sql_comments: false -# jdbc: -# batch_size: 20 -# lob: -# # postgres 사용시 createLob() 미구현 경고 삭제 -# non_contextual_creation: true -# # Jdbc 환경구성을 하는 과정에서 Default Metadata를 사용할 지 여부 -# temp: -# use_jdbc_metadata_defaults: false - -# ================================================================================================================== -# JPA logging lib setting -# ================================================================================================================== -decorator: - datasource: - p6spy: - # profiles 별로 정의 - #enable-logging: true - multiline: true - logging: slf4j - custom-appender-class: com.p6spy.engine.spy.appender.Slf4JLogger - log-format: com.xit.core.config.support.P6spySqlFormatConfiguration - tracing: - include-parameter-values: true diff --git a/mens-core/src/main/resources/config/application-common.yml b/mens-core/src/main/resources/config/application-common.yml index 34a9128..83837ab 100644 --- a/mens-core/src/main/resources/config/application-common.yml +++ b/mens-core/src/main/resources/config/application-common.yml @@ -96,6 +96,21 @@ logging: console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr([%18.18thread]){magenta}[traceId=%X{request_id}] %clr([%-35.35logger{35}::%-25.25method{25}:%4line]){cyan} %clr(%m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}){faint}' file: '%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} [%18.18thread][traceId=%X{request_id}] [%-35.35logger{35}::%-25.25method{25}:%4line] %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}' +# ================================================================================================================== +# SQL logging lib setting : spy.properties 파일에서 설정 +# ================================================================================================================== +#decorator: +# datasource: +# p6spy: +# # profiles 별로 정의 +# #enable-logging: true +# multiline: true +# logging: slf4j +# custom-appender-class: com.p6spy.engine.spy.appender.Slf4JLogger +# log-format: com.xit.core.config.support.P6spySqlFormatConfiguration +# tracing: +# include-parameter-values: true + # Spring Security cors 설정 :: CorsConfiguration 설정 값 cors: # 헤더에 작성된 출처만 브라우저가 리소스를 접근할 수 있도록 허용함.