Skip to content

Commit dd823fa

Browse files
committed
Update documentation for 5.0.0-M8 release
1 parent bd9d0d9 commit dd823fa

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

spring-batch-docs/src/main/asciidoc/whatsnew.adoc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Spring Batch 5.0 has the following major themes:
1616
* Batch infrastructure configuration updates
1717
* Batch testing configuration updates
1818
* Job parameters handling updates
19+
* Execution context serialization updates
20+
* SystemCommandTasklet updates
1921
* New features
2022
* Pruning
2123

@@ -207,6 +209,29 @@ parameterName='{"value": "parameterValue", "type":"parameterType", "identifying"
207209
where `parameterType` is the fully qualified name of the type of the parameter. Spring Batch provides the
208210
`JsonJobParametersConverter` to support this notation.
209211

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+
210235
[[batch-testing-configuration-updates]]
211236
=== Batch Testing Configuration Updates
212237

0 commit comments

Comments
 (0)