spring-reactive-playground | Reactive application based on Spring Web Reactive | Reactive Programming library
kandi X-RAY | spring-reactive-playground Summary
kandi X-RAY | spring-reactive-playground Summary
Spring Reactive Playground is a showcase for experimenting on applications based on Spring Framework 5.0 Reactive support, Spring Data Reactive and Reactive NoSQL drivers.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- The handler adapter
- Create web socket service
- Compares this person with the specified object
- Initialize data
- Adds the CORS mappings to the given registry
- Entry point for the application
- Handles incoming WebSocket session
- Gets the json view
- Shortcut for sending events
- Gets the jackson view with an observable
- Receive a received message
- Handles send events
- Shortcut method for short strings
- Gets mongo client
- Mapper
- Create a person
- Return a person
- Returns a hashCode of this id
- Domain handler mapping
- Create person
spring-reactive-playground Key Features
spring-reactive-playground Examples and Code Snippets
Community Discussions
Trending Discussions on spring-reactive-playground
QUESTION
I have a Spring reactive sample application that was modified from one of the examples that was provided in the the Spring Webflux documentation. The master
branch of this application uses Spring Boot in the traditional manner, with an embedded application server (Netty). It is working fine.
In the Liberty branch, I am trying to build the application as a WAR and deploy to Websphere Liberty Profile. Aside from changes to the build process, the most significant code change is having my Application.java
(source here) extend AbstractAnnotationConfigDispatcherHandlerInitializer
, as per Webflux documentation:
For Servlet containers especially with WAR deployment you can use the AbstractAnnotationConfigDispatcherHandlerInitializer which as a WebApplicationInitializer and is auto-detected by Servlet containers. It takes care of registering the ServletHttpHandlerAdapter as shown above. You will need to implement one abstract method in order to point to your Spring configuration.
However, when I do this, none of my resources/endpoints get mapped and none of my beans that I declare in Application.java
are registered. This is the full output that I get, with the exception being thrown when trying to access the context root:
ANSWER
Answered 2018-Jan-05 at 01:43Spring 5 brings some variants of WebApplicationInitializer
for webflux based applications.
Before Spring 5.0.2(Spring Boot 2.0.0.M7 aligned with this version), there is a bug in AbstractAnnotationConfigDispatcherHandlerInitializer
, and in 5.0.2, this class is marked as @Deprecated
, there is a new AbstractReactiveWebInitializer
introduced. But this class seems also buggy, I have to override the createApplicationContext()
to make it work.
See the comments in my sample AppInitializer for more details.
Check my workable war sample which was tested successfully on tomcat.
QUESTION
I am trying to replace a PostgreSQL database poller with the reactive asynchronous postgres-async-driver and stream newly inserted rows to a Spring 5 Webflux Reactive websocket client like Josh Long's awesome example demoed here and based on Sébastien Deleuze's spring-reactive-playground.
My Publisher
obtains the first row
, but then does not return subsequent rows.
Is the problem with my Observable
, my Publisher
, or with how I am using the postgres-async-driver Db
?
ANSWER
Answered 2018-Mar-29 at 03:47I created a Postgres Trigger that fires on INSERT
s to my table based on
this example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install spring-reactive-playground
Install Java 8
Install MongoDB (optional)
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