- spring batch mybatis 연동
mybatis-spring – MyBatis-Spring | Spring Batch
Spring Batch As of version 1.1.0 MyBatis-Spring provides three beans for building Spring Batch applications: the MyBatisPagingItemReader, the MyBatisCursorItemReader and the MyBatisBatchItemWriter. Also, As of version 2.0.0 provides three builder classes f
mybatis.org
1. Spring Batch 가이드 - 배치 어플리케이션이란?
Spring Batch In Action이 2011년 이후 개정판이 나오지도 않고 (2019.03 기준), 한글 번역판도 없고, 국내 Spring Batch 글 대부분이 튜토리얼이거나 공식 문서 중 일부분을 짧게 번역한 내용들이라 대용량 시스..
jojoldu.tistory.com
- 설정과 실행
https://parkjungwoong.github.io/20190801/
Spring Batch 설정과 실행
Spring Batch 설정과 실행
parkjungwoong.github.io
- 간단정리
https://cheese10yun.github.io/spring-batch-basic/
Spring Batch 간단 정리 - Yun Blog | 기술 블로그
Spring Batch 간단 정리 - Yun Blog | 기술 블로그
cheese10yun.github.io
- 특정 job만 실행
- yml 파일
spring:
batch:
job:
names: ${job.name:NONE}
enabled: true
OR
spring.batch.job.names: ${job.name:NONE}
spring.batch.job.enabled: true
- 실행 argument
--job.name=stepNextJob
OR
--job.name=step1,step2..
https://kwonnam.pe.kr/wiki/springframework/springboot/batch
Spring Boot 에서는 Spring Batch Command Line Job Runner 를 사용할 수 없다.
Spring Boot 의 Auto Configuration이 작동하지 않게 된다.
====================
- job을 커맨드라인 환경에서 실행 (jar로 실행)
Job을 커맨드라인 환경에서 실행 할 경우, CommandLineJobRunner 를 이용하여 구현한다.
(필수 옵션은 아니며 방법중 하나라는 것)실행시 첫번째와 두번째 인자는 applicationConext, 실행할 job명 이며, 이 두개는 필수이다.
세번째 인자부터는 Job Parameter로 매핑되며 형식은 key=value이다.실행 결과 반환은 ExitCodeMapper 인터페이스를 구현한다.
- yml 파일에 아래 추가
spring: batch: job: enabled: false
OR
spring.batch.job.enabled=false
https://kwonnam.pe.kr/wiki/springframework/batch/commandlinejobrunner
'spring-Integration' 카테고리의 다른 글
[rabbitMQ] retry Mechanism (0) | 2023.11.05 |
---|---|
[scheduler] 스프링 스케줄러 (0) | 2020.12.17 |
[spring-batch] scheduler로 실행 (0) | 2020.09.09 |
[spring-batch] 스프링배치 강좌 (0) | 2020.08.18 |
[spring-batch] batch 에러 (0) | 2020.04.18 |