Class ReactiveResourceUtil
java.lang.Object
org.springframework.data.elasticsearch.core.ReactiveResourceUtil
Utility to reactively read
Resource
s.- Since:
- 4.1
- Author:
- Peter-Josef Meisch
-
Method Summary
Modifier and TypeMethodDescriptionstatic reactor.core.publisher.Mono<Document>
loadDocument
(String path, String annotation) loads a Document initialized with data from a given resource path.static reactor.core.publisher.Mono<String>
Read aClassPathResource
into areactor.core.publisher.Mono<String>
.
-
Method Details
-
readFileFromClasspath
Read aClassPathResource
into areactor.core.publisher.Mono<String>
.- Parameters:
url
- the resource to read- Returns:
- a
Mono
emitting the resources content or an empty Mono on error
-
loadDocument
loads a Document initialized with data from a given resource path.- Parameters:
path
- the path to load data fromannotation
- the annotation that had the resource path defined- Returns:
- the parsed document
- Since:
- 4.4
-