Convert Between java.time.Instant and java.sql.Timestamp 1. Overview Both java.time.Instant and java.sql.Timestamp classes represent a point on the timeline in UTC. In other words, they represent the number of nanoseconds since the Java epoch. In this quick tutorial, we’ll convert one to the other by using built-in Java methods. 2. Converting Instant to Timestamp and Back We… Continue Reading java-time-instant-to-java-sql-timestamp

Spring Boot Reactor Netty Configuration 1. Overview In this tutorial, we’re going to look at different configuration options for a Reactor Netty server in a Spring Boot application. In the end, we’ll have an application showcasing different configuration approaches. 2. What is Reactor Netty? Before we start, let’s look at… Continue Reading spring-boot-reactor-netty

Primitive Collections in Eclipse Collections 1. Introduction In this tutorial, we’ll talk about primitive collections in Java and how Eclipse Collections can help. 2. Motivation Suppose we want to create a simple list of integers: List<Integer> myList = new ArrayList<>; int one = 1; myList.add(one); Since collections can only hold… Continue Reading java-eclipse-primitive-collections

Disable Spring Data Auto Configuration 1. Introduction In this quick tutorial, we’ll explore two different ways to disable database auto-configuration in Spring Boot, which can come in handy, say, when testing. We’ll see examples for Redis, MongoDB, and Spring Data JPA. Firstly, we’ll start by looking at the annotation-based approach… Continue Reading spring-data-disable-auto-config