SpringBoot application deployment and monitoring series - Part 1 - Build Services

SpringBoot application deployment and monitoring series - Part 1 - Build Services

This is the first part of our journey to learn SpringBoot application deployment and monitoring series. We will be using the following tools throughout the process, so please install them based on your operating system. Prerequisites Java 11, Maven (I would recommend using SDKMAN to install these tools) Docker, docker-compose VirtualBox Vagrant Ansible Minikube I will be using MacOS, Intellij Idea and shell scripting. You can use your favorite IDE, but try to use *nix like environment (Linux or MacOS) to be able to run those shell scripts.

Continue reading »
SpringBoot Application deployment and monitoring series

SpringBoot Application deployment and monitoring series

Few years ago I wrote a series of blog posts on Developing a simple e-commerce application from scratch to production using SpringBoot. Well, I covered most of the development stuff but left “to production” part because other things came up. Many things changed since then. Now I want to write a series of articles focusing on deployment and monitoring. So, I am planning to build a simple application using SpringBoot and deploy it in different ways.

Continue reading »
Quirks of Spring's @TestConfiguration

Quirks of Spring's @TestConfiguration

If you know me you know that I am a big fan of Spring ecosystem. I have been using Spring framework since 2007, and I am pretty familiar with many of its features. Even if we are familiar with some technology once in a while we get stuck with small issues and end up spending hours and hours figuring out why something is not working as expected. Spring framework is very flexible, and usually there are multiple ways to achieve the same thing.

Continue reading »
Philip's Testing Spring Boot Applications Masterclass Course Review

Philip's Testing Spring Boot Applications Masterclass Course Review

If you ever worked on a large project which doesn’t have any tests then you know how painful it is to work on such codebase. You know what is more painful? Working on a project which has plenty of USELESS tests written for the sake of passing minimum code coverage requirement. Being a Professional Software Developer means more than solving a problem. One needs to learn how to write maintainable and testable code, write meaningful tests, know what to test and what not to test, how to evolve the codebase backing with a good set of test suite.

Continue reading »
LocalStack SpringBoot Starter Tutorial

LocalStack SpringBoot Starter Tutorial

I was working on a SpringBoot application which is planned to deploy on AWS and, we were using S3, SQS and RDS services. LocalStack provides an easy-to-use test/mocking framework for developing AWS based Cloud applications. I want to use Localstack mock services instead of using real AWS services for two purposes: To run integration tests To run application locally We can use Testcontainers to spin up a Localstack docker container, but we need to configure Amazon service clients like AmazonS3, AmazonSQSAsync which is typical boilerplate that we copy-paste from project to project.

Continue reading »
All the resources you ever need as a Java & Spring application developer

All the resources you ever need as a Java & Spring application developer

Nowadays software development is a challenging task as the number of programming languages, frameworks, libraries are increasing rapidly day by day. Luckily, the number of resources to learn on the internet for free also increased a lot. There are a ton of free resources to learn almost everything on the internet. There are lots of official documentation, blog posts, Udemy courses, YouTube videos etc. As a backend developer who primarily work on JVM based languages/frameworks like Java, Kotlin, SpringBoot etc, following are a collection of resources I usually follow to learn new things.

Continue reading »
Remote debugging SpringBoot application

Remote debugging SpringBoot application

We all know how to run SpringBoot application in debug mode from our favorite IDEs(Eclipse/IntellijIDEA etc) and debug the code. Recently I had to debug a SpringBoot application which is running on a remote server. There is already lot of information on the Internet on how to remote debug java applications, but some approaches didn’t work for me. So, here I would like to share my findings. If application is running on localhost Suppose you are running your application on localhost only and remote debug from your IDE.

Continue reading »
SpringBoot Integration Testing using TestContainers Starter

SpringBoot Integration Testing using TestContainers Starter

One of the many reasons for huge popularity of Spring and SpringBoot is it’s great support for Testing. We can write unit tests using Mockito without requiring any Spring features. And, we can write Integration Tests using Spring testing support by creating Spring ApplicationContext. Read Guide to Testing SpringBoot Applications While running integration tests we might need to interact with external services like relational databases, NoSQL datastores, Kafka etc. We can spin up those external services as Docker containers and run tests against them.

Continue reading »
Creating Yeoman based SpringBoot Generator

Creating Yeoman based SpringBoot Generator

I have been working with Spring and SpringBoot for many years and I needed to create lot of Spring(Boot) applications for various reasons like blog posts, sample apps, book sample code and for my personal learning as well. So, I needed some tool/mechanism to quickly create Spring(Boot) application with most commonly used configuration. I know we have the most popular SpringBoot Initializer to create SpringBoot applications. But, it generates the application with only selected starter dependencies added and nothing more.

Continue reading »
Testing SpringBoot Applications

Testing SpringBoot Applications

SpringBoot is the most popular tech stack for building Java based REST APIs. In this tutorial we will learn how to write tests for SpringBoot applications. Create SpringBoot Application Unit Testing using JUnit 5 and Mockito Integration Testing using TestContainers Testing MicroService Integrations using MockServer As we all know, we write unit tests for testing single component (a class) behaviour where as we write integration tests for testing a feature which may involve interaction with multiple components.

Continue reading »