Spring WebClient vs. RestTemplate 1. Introduction In this tutorial, we’re going to compare two of Spring’s web client implementations – RestTemplate and new Spring 5’s reactive alternative WebClient. 2. Blocking vs. Non-Blocking Client It’s a common requirement in web applications to make HTTP calls to other services. Therefore, we need… Continue Reading spring-webclient-resttemplate

An Overview of Regular Expressions Performance in Java 1. Overview In this quick tutorial, we’ll show how the pattern-matching engine works. We’ll also present different ways to optimize regular expressions in Java. For an introduction to the use of regular expressions, please refer to this article here. 2. The Pattern-Matching Engine… Continue Reading java-regex-performance

Generate a Random Alphanumeric String in Kotlin 1. Overview In this tutorial, we’ll discuss how to generate a random alphanumeric String in Kotlin using three different approaches: Java Random, Kotlin Random, and Apache Commons Lang RandomStringUtils. Then, we’ll wrap up with a look at a high-performance approach. 2. Dependencies Before… Continue Reading kotlin-random-alphanumeric-string

Thymeleaf lists Utility Object 1. Overview Thymeleaf is a Java template engine for processing and creating HTML. In this quick tutorial, we’ll look into Thymeleaf’s lists utility object to perform common list-based operations. 2. Computing Size First, the size method returns the length of a list. We can include it, say,… Continue Reading thymeleaf-lists-utility