Class ReactiveResourceUtil
java.lang.Object
org.springframework.data.elasticsearch.core.ReactiveResourceUtil
Utility to reactively read
Resources.- 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 aClassPathResourceinto areactor.core.publisher.Mono<String>.
-
Method Details
-
readFileFromClasspath
Read aClassPathResourceinto areactor.core.publisher.Mono<String>.- Parameters:
url- the resource to read- Returns:
- a
Monoemitting 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
-