개략 - prebird/spring-practices GitHub Wiki
-
스프링배치의 DefaultBatchConfiguration
-
스프링부트의 배치 autoconfiguration
-
스프링배치에 @BatchTransactionManger 추가됨
그래서 기본 아래 에러는 왜나는건데... 공식 코드 대로 따라했는데 안됨
Parameter 1 of method step1 in com.example.batchpractice.gsExample.PersonBatchConfiguration required a bean of type 'org.springframework.jdbc.datasource.DataSourceTransactionManager' that could not be found.
아마 DataSourceTransactionManager 가 빈으로 주입 안되는 것 같다. https://github.com/spring-projects/spring-batch/issues/4126 이슈를 보면, 2022년에 기본 TransactionManager 가 DataSourceTransactionManager 에서 JdbcTransactionManager로 변경된 것으로 보인다. 즉, 해당 가이드 자료는 이것 이전에 작성된 것이라고 유추해 볼 수 있음..
https://github.com/spring-projects/spring-batch/issues/4191
Job name must be specified in case of multiple jobs
- 하나의 어플리케이션에 여러개의 Job이 존재한다면, 실행 시 Job의 이름을 명시해 주어야한다.
- Spring batch 5.0 부터 변경됨
- spring batch github 이슈