Skip to main content

Posts

Showing posts from August 7, 2022

Reactive Spring - Getting Started

Greetings! Reactive programming is very popular now. Every passionate Java developer wants to try out it with Webflux which is Spring's way of reactive web development.  In this first tutorial, I am not trying to explain Reactive Programming or Spring WebFlux or anything in detail. Instead, I would like to just play with it. Let's practice a little then come to theory on another day. Assumption : You know how to create and run a Spring Boot application. Warning : Do not try hard, just play with it. Full source code of this article -  reactive-spring-hello Create the project Go to Spring initializer ( https://start.spring.io/ ) and fill out project metadata. Add the below dependencies. Spring Reactive Web, Lombok Download and open the project with your desired IDE. Say hello Reactively Let's quickly create an endpoint (Controller) and add the below contents. Compile and run it. http://localhost:8080/mono, http://localhost:8080/flux package com.slmanju.reactivespringhello.