You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
스프링 배치(Spring Batch)
스프링 배치의 주요 특징
스프링 배치의 기본 구조
스프링 배치의 동작 방식
Job 실행
배치 작업(Job)이 시작되면 여러 Step이 순차적으로 실행된다.
Step 처리
각 Step은 ItemReader → ItemProcessor → ItemWriter 순서로 동작
Chunk 기반 처리
데이터를 일정 단위(Chunk)로 나누어 반복적으로 읽고, 처리하고, 저장합니다. 예를 들어, 100건씩 읽어서 처리 후 한 번에 저장.
오류/예외 처리
데이터 처리 중 오류가 발생하면 롤백, 재시도, 건너뛰기 등 다양한 전략을 설정할 수 있다.
API로 데이터 읽어 MySQL DB에 저장하는 스프링 배치
외부 API에서 데이터를 읽어와 MySQL DB에 저장하는 스프링 배치 예제 구조
주요 구성 요소
예시 코드
Beta Was this translation helpful? Give feedback.
All reactions