Skip to main content


Showing posts from August 7, 2022

AWS Spring - Deploy Spring Boot application to AWS EC2

Greetings! AWS and Spring are two of the most needed skills Java developer needs these days. It is no fun to just learn theory. Let's host our tiny Spring backed application in AWS. Assumption : You are comfortable with Spring, AWS but exploring how to deploy. In this basic setup, we are going to use the easiest way in contrast to learning. We had a running system in this way which had around 8~10 microservices. I missed those days anyway. It is very primitive but it works! Steps Let's define what we are going to do. Create an EC2 instance Create Spring Boot app Setup EC2 Copy Spring boot application into EC2 and run Create an EC2 instance I assume you already know this step. However, there are a few things to note. Make sure to download your keypair (mykeypair.pem) and set the correct permission (chmod +400) Security group - Add 2 rules to allow ssh (port 22) and HTTP access with port 8080 Create a Spring boot applicatio

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 ( ) 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.