Add possibility to configure a custom ExecutionContextSerializer in BatchAutoConfiguration
See #38234
Comment From: cachescrubber
I would like to auto configure a Jackson2ExecutionContextStringSerializer if enables by a use property.
@Bean
@ConditionalOnMissingBean(ExecutionContextSerializer.class)
@ConditionalOnProperty(prefix = "spring.batch.jdbc", name = "use-jackson2-context-serializer", havingValue = "false")
public Jackson2ExecutionContextStringSerializer executionContextStringSerializer() {
return new Jackson2ExecutionContextStringSerializer();
}
@fmbenhassine WDYT?
Comment From: fmbenhassine
There is no need for a property, the presence of a bean of type ExecutionContextSerializer is enough to be picked up by Boot, otherwise a DefaultExecutionContextSerializer should be used. The last PR update LGTM.
Comment From: mhalbritter
Thank you very much!