Class Jackson2EventSerializer

java.lang.Object
org.springframework.modulith.events.jackson2.Jackson2EventSerializer
All Implemented Interfaces:
EventSerializer

@Deprecated class Jackson2EventSerializer extends Object implements EventSerializer
Deprecated.
since 2.0, in favor of JacksonEventSerializationConfiguration.
A Jackson-based EventSerializer.
Since:
2.0
Author:
Oliver Drotbohm
  • Constructor Details

    • Jackson2EventSerializer

      public Jackson2EventSerializer(Supplier<com.fasterxml.jackson.databind.ObjectMapper> mapper)
      Deprecated.
      Creates a new Jackson2EventSerializer for the given ObjectMapper.
      Parameters:
      mapper - must not be null.
  • Method Details

    • serialize

      public Object serialize(Object event)
      Deprecated.
      Description copied from interface: EventSerializer
      Serializes the given event into a storable format.
      Specified by:
      serialize in interface EventSerializer
      Parameters:
      event - must not be null.
      Returns:
      will never be null.
    • deserialize

      public <T> T deserialize(Object serialized, Class<T> type)
      Deprecated.
      Description copied from interface: EventSerializer
      Deserializes the event from the serialization format into an instance of the given type.
      Specified by:
      deserialize in interface EventSerializer
      Parameters:
      serialized - must not be null.
      type - must not be null.
      Returns:
      will never be null.