Class UnmarshallingResourceReader
java.lang.Object
org.springframework.data.repository.init.UnmarshallingResourceReader
- All Implemented Interfaces:
ResourceReader
- Author:
- Oliver Gierke, Christoph Strobl
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.repository.init.ResourceReader
ResourceReader.Type
-
Constructor Summary
ConstructorDescriptionUnmarshallingResourceReader
(org.springframework.oxm.Unmarshaller unmarshaller) -
Method Summary
Modifier and TypeMethodDescriptionreadFrom
(org.springframework.core.io.Resource resource, ClassLoader classLoader) Reads a single orCollection
of target objects from the givenResource
.
-
Constructor Details
-
UnmarshallingResourceReader
public UnmarshallingResourceReader(org.springframework.oxm.Unmarshaller unmarshaller) - Parameters:
unmarshaller
-
-
-
Method Details
-
readFrom
public Object readFrom(org.springframework.core.io.Resource resource, @Nullable ClassLoader classLoader) throws IOException Description copied from interface:ResourceReader
Reads a single orCollection
of target objects from the givenResource
.- Specified by:
readFrom
in interfaceResourceReader
- 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:
IOException
-