Introduction to WebSocket with Spring Boot

Let’s look at how to add WebSocket support to a spring boot application. We will try to create a simple chat application. Note that this implementation does not use STOMP. What is WebSocket? The WebSocket protocol helps establish a full-duplex two-way communication between client and server over a single TCP connection. This protocol is different…

Troubleshoot Auto-Configurations in Spring Boot Applications

In this post, we will take a look at how to troubleshoot auto-configurations in Spring Boot applications. What are Auto-Configurations? Spring boot autoconfiguration is where the magic happens. The auto-configuration tries to automatically configure your application based on what’s in the classpath. For example, the h2 database jar in classpath will result in spring boot…

What is spring boot? – Introduction

Spring Boot is an opinionated view of the spring ecosystem and third-party libraries. It helps you to create stand-alone, production-grade Spring-based Applications that you can just run. Spring Boot lets you create Java applications that can run by using java -jar or traditional war deployments. It also provides a command-line tool that runs “spring scripts” with minimum…

Spring Boot Annotations | Beginners guide

Let’s take a look at a list of important spring boot annotations and when to use them with an example. What are annotations? Annotations are a form of hints that a developer can give about their program to the compiler and runtime. Based on these hints, the compilers and runtimes can process these programs differently….

Bridge Design Pattern

The Bridge design pattern is a structural pattern that deals with decoupling abstraction and its implementation. It lets you split a set of related classes into two separate abstraction and implementation hierarchies. As these are now separated, you can develop them independently of each other. Let’s understand this design pattern with an example in Java….

Spring Boot Latest Version

As of May 21st of 2021, The latest stable spring boot version is 2.5.0. Spring Boot 2.5.0 offers a variety of new fixes and dependency updates. Let’s check them out in detail. Java and Spring Boot version Compatibility Spring Boot 2.5.0 requires at least Java 8. It is also tested with java 16. Important dependency…

SpringApplication Class in spring Boot

In this post, We will take a look at SpringApplication class, What its purpose and How to use SpringApplication class in Spring Boot. Introduction to SpringApplication class You may have seen this class already. When generating a Spring Boot project from Spring Initializer or from IDE, You could see this class in the main method….

Failure Analyzers in Spring Boot and How they Work

In this post, We will take a look at how Failure Analyzers in Spring Boot work and how to implement them to handle startup failures in spring boot. Introduction to Failure analyzers Failure Analyzers is a diagnostics feature from Spring Boot to deal with startup failures. If your application fails to start, These FailureAnalyzers would try…

Understanding Lazy Initialization in Spring Boot

Starting with Spring Boot 2.2, spring beans can be lazy. That is, You could create beans as and when required. Let’s see how to implement lazy initialization with Spring Boot. What is lazy initialization? By default, Spring Framework creates and injects beans and it’s dependencies at the time of context creation or refresh. But with…

Changing Default Port Number in Spring Boot

The developers love spring Boot because it’s out of the box defaults. But sometimes, the developers may need to change these default values. Out of these, The most common one is to change the default port number of embedded web servers in spring boot. So let’s check out the various ways to override the default…