public class StateMachineJackson2ResourceReader
extends java.lang.Object
implements org.springframework.data.repository.init.ResourceReader
ResourceReader
using Jackson to read JSON into objects.Constructor and Description |
---|
StateMachineJackson2ResourceReader()
Creates a new
Jackson2ResourceReader . |
StateMachineJackson2ResourceReader(com.fasterxml.jackson.databind.ObjectMapper mapper)
Creates a new
Jackson2ResourceReader using the given ObjectMapper . |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
readFrom(org.springframework.core.io.Resource resource,
java.lang.ClassLoader classLoader) |
void |
setTypeKey(java.lang.String typeKey)
Configures the JSON document's key to lookup the type to instantiate the object.
|
public StateMachineJackson2ResourceReader()
Jackson2ResourceReader
.public StateMachineJackson2ResourceReader(com.fasterxml.jackson.databind.ObjectMapper mapper)
Jackson2ResourceReader
using the given ObjectMapper
.mapper
- the mapperpublic void setTypeKey(java.lang.String typeKey)
Jackson2ResourceReader.DEFAULT_TYPE_KEY
.typeKey
- the new type keypublic java.lang.Object readFrom(org.springframework.core.io.Resource resource, java.lang.ClassLoader classLoader) throws java.lang.Exception
readFrom
in interface org.springframework.data.repository.init.ResourceReader
java.lang.Exception