Creating the Java Builder for a Class in IntelliJ
1. Introduction The Builder design pattern is one of the most widely used creational patterns. It helps us to construct complex objects. Writing builders by hand is cumbersome and error-prone....
View ArticleR2DBC – Reactive Relational Database Connectivity
1. Overview In this tutorial, we’ll show how we can use R2DBC to perform database operations in a reactive way. In order to explore R2DBC, we’ll create a simple Spring WebFlux REST application that...
View ArticleJava EE Application with Kotlin
1. Overview Java and Kotlin are both languages designed for the JVM. However, if we were to try and use Kotlin in Java EE container, we’d immediately run into some idiomatic challenges. In this...
View ArticleShell Sort in Java
1. Introduction In this tutorial, we’ll describe the Shell sort algorithm in Java. 2. The Shell Sort Overview 2.1. Description Let’s first describe the Shell sort algorithm so we know what we’re trying...
View ArticleChanging the Thymeleaf Template Directory in Spring Boot
1. Introduction Thymeleaf is a template engine that we can use for our Spring Boot applications. As with many things, Spring Boot provides a default location where it expects to find our templates. In...
View ArticleA Guide to the sql2o JDBC Wrapper
1. Introduction In this tutorial, we’re going to take a look at Sql2o, a small and fast library for relational database access in idiomatic Java. It is worth to mention that even though Sql2o works by...
View ArticleFunctional Controllers in Spring MVC
1. Introduction Spring 5 introduced WebFlux, a new framework that lets us build web applications using the reactive programming model. In this tutorial, we’ll see how we can apply this programming...
View ArticleReloading Properties Files in Spring
1. Overview In this tutorial, we’re going to show how to reload properties in a Spring application. 2. Reading Properties in Spring We have different options to access properties in Spring: Environment...
View ArticleMapping Entitiy Class Names to SQL Table Names with JPA
1. Introduction In this short tutorial, we’ll learn how to set SQL table names using JPA. We’ll cover how JPA generates the default names and how to provide custom ones. 2. Default Table Names The JPA...
View ArticleThe Difference Between Failure and Error in JUnit
1. Introduction In this tutorial, we’ll explore the differences between a failure and an error in JUnit tests. In short, failures are unfulfilled assertions while errors are due to abnormal test...
View ArticleJava Weekly, Issue 292
Here we go… 1. Spring and Java >> Running Single-file Programs without Compiling in Java 11 [infoq.com] Starting with Java 11, we can now run single-file programs without all the hassle. How cool...
View ArticleGuide to StreamTokenizer
1. Introduction In this tutorial, we’ll show how to parse a stream of characters into tokens using the Java StreamTokenizer class. 2. StreamTokenizer The StreamTokenizer class reads the stream...
View ArticleThe Difference between getRequestURI and getPathInfo in HttpServletRequest
1. Overview In this tutorial, we’ll discuss the difference between getRequestURI() and getPathInfo() in the HttpServletRequest class. 2. Difference between getRequestURI() and getPathInfo() The...
View ArticleGuide to @SpringBootConfiguration in Spring Boot
1. Overview In this tutorial, we’ll briefly discuss the @SpringBootConfiguration annotation. We’ll also look at its usage in a Spring Boot application. 2. Spring Boot Application Configuration...
View ArticleBetter Retries with Exponential Backoff and Jitter
1. Overview In this tutorial, we’ll explore how we can improve client retries with two different strategies: exponential backoff and jitter. 2. Retry In a distributed system, network communication...
View ArticleSpring Security: Exploring JDBC Authentication
1. Overview In this short tutorial, we’ll explore the capabilities offered by Spring to perform JDBC Authentication using an existing DataSource configuration. In our Authentication with a...
View ArticleDepth First Search in Java
1. Overview In this tutorial, we’ll explore Depth-first search in Java. Depth-first search (DFS) is a traversal algorithm used for both Tree and Graph data structures. Depth-first search goes deep in...
View ArticleComposition, Aggregation, and Association in Java
1. Introduction Objects have relationships between them, both in real life and in programming. Sometimes it’s difficult to understand or implement these relationships. In this tutorial, we’ll focus on...
View ArticleSpring WebClient Filters
1. Overview In this tutorial, we’re going to explore WebClient filters in Spring WebFlux, a functional, reactive web framework. 2. Request Filters A filter can intercept, examine, and modify a client...
View ArticleInterface Driven Controllers in Spring
1. Introduction In this tutorial, we consider a new feature of Spring MVC that allows us to specify the web requests using usual Java interfaces. 2. Overview Usually, when defining a controller in...
View Article