@@ -16,6 +16,8 @@ Spring Batch 5.0 has the following major themes:
16
16
* Batch infrastructure configuration updates
17
17
* Batch testing configuration updates
18
18
* Job parameters handling updates
19
+ * Execution context serialization updates
20
+ * SystemCommandTasklet updates
19
21
* New features
20
22
* Pruning
21
23
@@ -207,6 +209,29 @@ parameterName='{"value": "parameterValue", "type":"parameterType", "identifying"
207
209
where `parameterType` is the fully qualified name of the type of the parameter. Spring Batch provides the
208
210
`JsonJobParametersConverter` to support this notation.
209
211
212
+ [[execution-context-serialization-updates]]
213
+ === Execution context serialization updates
214
+
215
+ Starting from v5, the `DefaultExecutionContextSerializer` was updated to serialize/deserialize the context to/from Base64.
216
+
217
+ Moreover, the default `ExecutionContextSerializer` configured by `@EnableBatchProcessing` or `DefaultBatchConfiguration`
218
+ was changed from `JacksonExecutionContextStringSerializer` to `DefaultExecutionContextSerializer`. The dependency to
219
+ Jackson was made optional. In order to use the `JacksonExecutionContextStringSerializer`, `jackson-core` should be added
220
+ to the classpath.
221
+
222
+ [[system-command-tasklet-updates]]
223
+ === SystemCommandTasklet updates
224
+
225
+ The `SystemCommandTasklet` has been revisited in this release and was changed as follows:
226
+
227
+ * A new strategy interface named `CommandRunner` was introduced in order to decouple the command execution
228
+ from the tasklet execution. The default implementation is the `JvmCommandRunner` which uses the `java.lang.Runtime#exec`
229
+ API to run system commands. This interface can be implemented to use any other API to run system commands.
230
+
231
+ * The method that runs the command now accepts an array of `String`s representing the command and its arguments.
232
+ There is no need anymore to tokenize the command or do any pre-processing. This change makes the API more intuitive,
233
+ and less prone to errors.
234
+
210
235
[[batch-testing-configuration-updates]]
211
236
=== Batch Testing Configuration Updates
212
237
0 commit comments