Lazy Initialization in Spring Boot 2 1. Overview In this tutorial, we’ll see how to configure lazy initialization at the application level, starting with Spring Boot 2.2 2. Lazy Initialization By default in Spring, all the defined beans, and their dependencies, are created when the application context is created. In… Continue Reading spring-boot-lazy-initialization

Spring Boot Dependency Management with a Custom Parent 1. Overview Spring Boot provides the parent POM for an easier creation of Spring Boot applications. However, using the parent POM may not always be desirable, if we already have a parent to inherit from. In this quick tutorial, we’re going to… Continue Reading spring-boot-dependency-management-custom-parent

Logging to Graylog with Spring Boot 1. Introduction Graylog is a log aggregation service. Simply put, it’s capable of collecting millions of log messages from multiple sources and displaying them in a single interface. And, it also provides a number of other features such as real-time alerts, dashboards with graphs… Continue Reading graylog-with-spring-boot

Running Setup Data on Startup in Spring 1. Introduction In this article we’ll focus on how to run logic at the startup of a Spring application. Further reading: Configure a Spring Boot Web Application Some of the more useful configs for a Spring Boot application. Read more → Spring Boot:… Continue Reading running-setup-logic-on-startup-in-spring

Non-blocking Spring Boot with Kotlin Coroutines 1. Overview Kotlin Coroutines can often add readability to reactive, callback-heavy code. In this tutorial, we’ll find out how to leverage these coroutines for building non-blocking Spring Boot applications. We’ll also compare the reactive and coroutine approaches. 2. Coroutine Motivation Nowadays, it is common for… Continue Reading spring-boot-kotlin-coroutines

Spring Boot Console Application 1. Overview In this quick tutorial, we’ll explore how to create a simple console-based application using Spring Boot. 2. Maven Dependencies Our project relies on the spring-boot parent: <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.3.RELEASE</version> </parent> The initial dependency required is: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> 3. Console Application Our… Continue Reading spring-boot-console-app

Introduction to Chaos Monkey 1. Introduction In this tutorial, we’re going to talk about Chaos Monkey for Spring Boot. This tool helps us introduce some of the principles of chaos engineering into our Spring Boot web applications by adding latency to our REST endpoints, throwing errors, or even killing an app.… Continue Reading spring-boot-chaos-monkey

Configuring a Hikari Connection Pool with Spring Boot 1. Overview Hikari is a JDBC DataSource implementation that provides a connection pooling mechanism. Compared to other implementations, it promises to be lightweight and better performing. For an introduction to Hikari, see this article. This quick tutorial shows how we can configure a Spring… Continue Reading spring-boot-hikari