Skip to content
stella edited this page Jun 13, 2014 · 10 revisions

Spring Batch + Boot

  • Batch 수행에 대해 Boot에서 간단하게 처리해 줌. (@EnableBatchProcessing (from Spring Batch))
  • 모든 Job을 실행시키는게 디폴트이지만 특정 JOB을 지정할 수도 있음. (프로퍼티 파일을 통해 지정)

Spring Batch auto configuration is enabled by adding @EnableBatchProcessing (from Spring Batch) somewhere in your context. By default it executes all Jobs in the application context on startup (see JobLauncherCommandLineRunner for details). You can narrow down to a specific job or jobs by specifying spring.batch.job.names (comma separated job name patterns). If the application context includes a JobRegistry then the jobs in spring.batch.job.names are looked up in the registry instead of being autowired from the context. This is a common pattern with more complex systems where multiple jobs are defined in child contexts and registered centrally. See BatchAutoConfiguration and @EnableBatchProcessing for more details.

Spring Batch 3.0.0 (new feature)

<?xml version="1.0" encoding="UTF-8"?>
<job id="myJob3" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
    <step id="step1" >
        <batchlet ref="testBatchlet" />
    </step>
</job>
  • Upgrade to Support Spring 4 and Java 8
  • Promote Spring Batch Integration to Spring Batch (Launching jobs via messages, Async ItemProcessor, feedback message, remote partitioning&remote chunking)
  • JobScope Support
  • SQLite Support

Domain

  • Job : 전체 배치 프로세스 자체.
  • Step : Job 내부에 세부적으로 나눠진 단계들. 모든 Job은 1개 이상의 step을 가짐.
  • Chunk : 한번에 실행된 item들의 묶음.

Clone this wiki locally