[id='spring-boot-serialization_{context}']
= Configuring Marshalling
Configure {brandname} to marshall Java objects into binary format so they can be transferred over the wire or stored to disk.

By default {brandname} uses a Java Serialization marshaller, which requires you to add your classes to an allow list.
As an alternative you can use ProtoStream, which requires you to annotate your classes and generate a `SerializationContextInitializer` for custom Java objects.

.Procedure

. Open `hotrod-client.properties` or `application.properties` for editing.
. Do one of the following:
+
* Use ProtoStream as the marshaller.
+
[source,text,options=nowrap,subs=attributes+]
----
infinispan.client.hotrod.marshaller=org.infinispan.commons.marshall.ProtoStreamMarshaller
----
+
[source,text,options=nowrap,subs=attributes+]
----
infinispan.remote.marshaller=org.infinispan.commons.marshall.ProtoStreamMarshaller
----
+
* Add your classes to the serialization allow list if you use Java Serialization.
You can specify a comma-separated list of fully qualified class names or a regular expression to match classes.
+
[source,text,options=nowrap,subs=attributes+]
----
infinispan.client.hotrod.java_serial_allowlist=your_marshalled_beans_package.*
----
+
[source,text,options=nowrap,subs=attributes+]
----
infinispan.remote.java-serial-allowlist=your_marshalled_beans_package.*
----
+
. Save and close your properties file.

[role="_additional-resources"]
.Additional resources
* link:{encoding_docs}[Cache Encoding and Marshalling]
