Class Jackson2ResourceReader

java.lang.Object
org.springframework.data.repository.init.Jackson2ResourceReader
All Implemented Interfaces:
ResourceReader

@Deprecated(since="4.0", forRemoval=true) public class Jackson2ResourceReader extends Object implements ResourceReader
Deprecated, for removal: This API element is subject to removal in a future version.
since 4.0, in favor of JacksonResourceReader.
A ResourceReader using Jackson to read JSON into objects.
Since:
1.6
Author:
Oliver Gierke, Christoph Strobl, Mark Paluch, Johannes Englmeier
  • Constructor Details

    • Jackson2ResourceReader

      public Jackson2ResourceReader()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new Jackson2ResourceReader.
    • Jackson2ResourceReader

      public Jackson2ResourceReader(@Nullable com.fasterxml.jackson.databind.ObjectMapper mapper)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new Jackson2ResourceReader using the given ObjectMapper.
      Parameters:
      mapper -
  • Method Details

    • setTypeKey

      public void setTypeKey(@Nullable String typeKey)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures the JSON document's key to lookup the type to instantiate the object. Defaults to DEFAULT_TYPE_KEY.
      Parameters:
      typeKey -
    • readFrom

      public Object readFrom(Resource resource, @Nullable ClassLoader classLoader) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ResourceReader
      Reads a single or Collection of target objects from the given Resource.
      Specified by:
      readFrom in interface ResourceReader
      Parameters:
      resource - must not be null.
      classLoader - can be null.
      Returns:
      Collection of target objects if resource contains multiple ones of single on. Never null.
      Throws:
      Exception