> For the complete documentation index, see [llms.txt](https://seokrae.gitbook.io/sr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://seokrae.gitbook.io/sr/spring/batch-study.md).

# Spring Batch

* [Github](https://github.com/spring-org/springbatch-in-action)

## 심플 배치 작성기

* [배치용 디비 설치](/sr/spring/batch-study/_1.md)
* [배치 데이터 분석하기](/sr/spring/batch-study/_2.md)
* [배치 프로세스 구상하기 및 성능 차이 확인하기](/sr/spring/batch-study/_3.md)

## 스터디 진행 방식

1. 스프링 배치 `기본 개념` 학습
2. 전체적 배치 프로세스를 이해하기 위한 `도메인` 선택 및 세 가지 이상 기능이 추가된 `프로세스 설계`
3. 프로세스 기능에 필요한 `Reader`, `Processor`, `Writer` 또는 `Tasklet`으로 구현
   * FlatFileReader, JdbcCursorItemReader, JpaPagingItemReader
   * ItemProcessor
   * JpaItemWriter, CompositeItemWriter, ExcelItemWriter
   * MySQL, H2, Oracle
4. 프로세스 구현 시 중복되는 기능 및 프로세스 개선(필요시 Redis 등등 추가)
5. 스케줄러에 대한 종류 찾아보기(Jenkins, Airflow, custom 등등)

## SpringBatch Schema ERD

![erd](/files/-MXHqb1iyNr0QRX-zDbD)

* [batch-schema](https://github.com/SeokRae/TIL/tree/0ad617a94d2a4ec9753d2dec67900a849bb40b43/batch-study/batch-schema.md)

## 추가적 진행

* [x] txt 파일 reader 기능 추가 (csv, txt, excel)
* [x] excel Report 모듈 참고 구현
* [x] 배치 프로세스상에서 Step 간의 `데이터 공유`하는 방법 개선(외부 모듈 사용 X)
* [x] 속도를 줄이기 위해 Parallel Step or MultiThread로 구현해보기
* [x] JPA Querydsl를 활용하여 조인쿼리로 수정하기
* [x] JPA, Jdbc 속도 비교 (속도를 어느정도 포기하고 코드양을 줄일 것인지..?)
* [ ] 엘라스틱 서치 스택을 추가하여 배치와 연동


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://seokrae.gitbook.io/sr/spring/batch-study.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
