Class JacksonMessagingUtils

java.lang.Object
org.springframework.integration.support.json.JacksonMessagingUtils

public final class JacksonMessagingUtils extends Object
Utility for creating Jackson JsonMapper instance for Spring messaging.

Provides custom serializers/deserializers for Spring messaging types and validates deserialization against trusted package patterns.

Since:
7.0
Author:
Jooyoung Pyoung
  • Field Details

    • DEFAULT_TRUSTED_PACKAGES

      public static final List<String> DEFAULT_TRUSTED_PACKAGES
      The packages to trust on JSON deserialization by default.
  • Method Details

    • messagingAwareMapper

      public static tools.jackson.databind.json.JsonMapper messagingAwareMapper(String @Nullable ... trustedPackages)
      Return an JsonMapper if available, supplied with Message specific serializers and deserializers. Also configured to store typo info in the @class property.
      Parameters:
      trustedPackages - the trusted Java packages for deserialization.
      Returns:
      the JSON mapper.
      Throws:
      IllegalStateException - if an implementation is not available.
      Since:
      7.0