====== Spring Batch 4 ====== * [[https://spring.io/blog/2017/12/04/spring-batch-4-0-0-release-is-now-available|Spring Batch 4.0.0.RELEASE is now available]] * [[https://spring.io/blog/2018/10/29/spring-batch-4-1-goes-ga|Spring Batch 4.1 goes GA!]] ===== Migrate from 2,3 ===== * Spring Batch 2,3 에서 업그레이드시에 ''BATCH_JOB_EXECUTION_CONTEXT'', ''BATCH_STEP_EXECUTION_CONTEXT'' 에 저장하는 데이터의 직렬화 라이브러리가 XStream -> Jackson 으로 변경되면서 포맷이 바뀌어서 호환이 안된다. * 따라서 기존 데이터를 차라리 아예 삭제해버리거나, 새로운 포맷에 맞게 모두 일괄 변경해서 다시 실행해야만 한다. * [[https://stackoverflow.com/questions/49625231/migration-to-spring-boot-2-and-using-spring-batch-4|Migration to Spring Boot 2 and using Spring Batch 4 - Stack Overflow]] > Before Spring Batch 4, the default serialization mechanism for the ExecutionContext was via XStream. Now it uses Jackson by default which is not compatible with the old serialization format. We still have the old version available (XStreamExecutionContextStringSerializer) but you'll need to configure it yourself by implementing a BatchConfigurer and overriding the configuration in the JobRepositoryFactoryBean. > For the record, this is related to this issue: https://jira.spring.io/browse/BATCH-2575.