diff --git a/build.gradle b/build.gradle
index 7e92d30d1..d56a4b536 100644
--- a/build.gradle
+++ b/build.gradle
@@ -98,7 +98,7 @@ allprojects {
sqliteVersion = '3.32.3.3'
woodstoxVersion = '6.2.8'
xmlunitVersion = '2.8.4'
- xstreamVersion = '1.4.16'
+ xstreamVersion = '1.4.19'
jrubyVersion = '1.7.27'
beanshellVersion = '2.0b5'
jaxbApiVersion = '2.3.1'
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/XStreamExecutionContextStringSerializer.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/XStreamExecutionContextStringSerializer.java
index f911d86e5..468458c8f 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/XStreamExecutionContextStringSerializer.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/XStreamExecutionContextStringSerializer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2018 the original author or authors.
+ * Copyright 2006-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -78,6 +78,7 @@ public class XStreamExecutionContextStringSerializer implements ExecutionContext
else {
xstream = new XStream(reflectionProvider, hierarchicalStreamDriver);
}
+ xstream.allowTypesByRegExp(new String[]{"org.springframework.batch.*"});
}
/**
diff --git a/spring-batch-samples/src/main/resources/jobs/iosample/xml.xml b/spring-batch-samples/src/main/resources/jobs/iosample/xml.xml
index c866b93a5..9ebf3f6b0 100644
--- a/spring-batch-samples/src/main/resources/jobs/iosample/xml.xml
+++ b/spring-batch-samples/src/main/resources/jobs/iosample/xml.xml
@@ -28,6 +28,15 @@
+
+
+
+
+ org.springframework.batch.sample.domain.trade.CustomerCredit
+
+
+
+