reactor-demo | Isomorphic Javascript app with React | Frontend Framework library
kandi X-RAY | reactor-demo Summary
kandi X-RAY | reactor-demo Summary
Demo isomorphic app using reactor-core and React.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of reactor-demo
reactor-demo Key Features
reactor-demo Examples and Code Snippets
Community Discussions
Trending Discussions on reactor-demo
QUESTION
I am trying to use Spring Reactor with my Spring Boot application.
I am using Project Reactor 3.0.7.RELEASE and Spring Boot 1.5.3.RELEASE.
I have a method in my Service class which returns Flux.
I want to return the value to controller in web layer. But, I do not see the values returns in the json response.
When I invoke http://localhost:8080 from browser, I get response as, {"prefetch":-1}
I am not sure if I should I do some conversion from Flux to String before returning the response.
I have my code shared in , https://github.com/bsridhar123/spring-reactor-demo/blob/master/src/main/java/com/demo/reactor/ReactiveApp.java
Can you please help me on the correct approach for it.
...ANSWER
Answered 2017-Jun-01 at 07:57Full reactive support using Reactor is only implemented in Spring 5 (currently in RC phase) and Spring Boot 2 (currently in Milestone phase).
You can use Reactor independently of Spring, but that doesn't make the framework reactive and asynchronous so you lose some benefit. You cannot simply return a Flux
as the framework doesn't yet understand this type.
However, I believe it can still be useful in the service layer, if you have to orchestrate a lot of service calls.
What you can do in this case is to use Flux
and Mono
throughout your service layer and convert those to Spring 4's DeferredResult
. Something like:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install reactor-demo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page