문서의 이전 판입니다!
org.springframework.batch.core.repository.support.JobRepositoryFactoryBean
로 SimpleJobRepository
생성MapJobRepositoryFactoryBean
로 in memory Job Repository 생성 가능.org.springframework.batch.core
패키지에 schema-*.sql
파일이 Batch Job Repository DB 스키마이다.schema-mysql.sql
의 경우 text
→ longtext
datetime
→ datetime(6)
로 변경해서 실행할 것.TransactionManager를 지정하지 않으면 다음과 같은 오류가 발생한다.
java.lang.IllegalStateException: To use the default BatchConfigurer the context must contain precisely one DataSource, found X
TransactionManager 를 ResourcelessTransactionManager 로 지정하면 된다.
혹은 아래와 같이 propagation=“NEVER”
로 지정한다.
<batch:job id="jobid"> <batch:step id="step1"> <batch:tasklet ref="taskletId" transaction-manager="transactionManager"> <batch:transaction-attributes propagation="NEVER"/> </batch:tasklet> </batch:step> </batch:job>