Class JacksonEventSerializer
java.lang.Object
org.springframework.modulith.events.jackson.JacksonEventSerializer
- All Implemented Interfaces:
EventSerializer
A Jackson-based
EventSerializer.- Author:
- Oliver Drotbohm
-
Constructor Summary
ConstructorsConstructorDescriptionJacksonEventSerializer(Supplier<com.fasterxml.jackson.databind.ObjectMapper> mapper) Creates a newJacksonEventSerializerfor the givenObjectMapper. -
Method Summary
-
Constructor Details
-
JacksonEventSerializer
Creates a newJacksonEventSerializerfor the givenObjectMapper.- Parameters:
mapper- must not be null.
-
-
Method Details
-
serialize
Description copied from interface:EventSerializerSerializes the given event into a storable format.- Specified by:
serializein interfaceEventSerializer- Parameters:
event- must not be null.- Returns:
- will never be null.
-
deserialize
Description copied from interface:EventSerializerDeserializes the event from the serialization format into an instance of the given type.- Specified by:
deserializein interfaceEventSerializer- Parameters:
serialized- must not be null.type- must not be null.- Returns:
- will never be null.
-