Testcontainers Desktop
1. Overview In this tutorial, we’ll explore the Testcontainers Desktop application, a simple yet powerful tool for running Testcontainers. We’ll learn how to use it to configure our Docker environment,...
View ArticleDifference Between GroupId and ConsumerId in Apache Kafka
1. Introduction In this tutorial, we’ll clarify the difference between GroupId and ConsumerId in Apache Kafka, which is important in understanding how to set up consumers correctly. In addition, we’ll...
View ArticleGet First n Characters in a String in Java
1. Overview In this short tutorial, we’ll explore different ways of getting the first n characters of a string in Java. First, we’ll learn how to do this using core JDK methods and classes. Then, we’ll...
View ArticleJava Weekly, Issue 531
1. Spring and Java >> How to use Java Records with Spring Data JPA [vladmihalcea.com] Records meet JPA: a practical guide on how to use Java Records with Spring Data JPA Repositories. >>...
View ArticleRemove Only Trailing Spaces or Whitespace From a String in Java
1. Overview String manipulation is a common task in Java programming. Sometimes, trailing whitespace can lead to inconsistencies, increase storage sizes, and even cause unintended bugs. In this quick...
View ArticleSpring Data JPA Repository for Database View
1. Overview A database view is a table-like structure in a relational database system in which the data source is from one or more tables joined together. While Spring Data repositories are commonly...
View ArticleSkip Select Before Insert in Spring Data JPA
1. Overview In some cases, when we’re saving an entity using a Spring Data JPA Repository, we may encounter an additional SELECT in the logs. This may cause performance issues due to numerous extra...
View ArticleGson TypeToken With Dynamic List Item Type
1. Overview In this tutorial, we’ll discuss converting a JSON array into an equivalent java.util.List object. Gson is a Java library by Google that helps convert JSON strings to Java objects and vice...
View ArticleFind the Largest Prime Under the Given Number in Java
1. Overview Finding the largest prime less than a given number is a classic problem in computer science and mathematics. In this short tutorial, we’ll explore two approaches to solve this problem in...
View ArticleCustom Event Handlers and Listeners in Netty
1. Introduction In this tutorial, we’ll use Netty to create a chat room app. In network programming, Netty stands out as a robust framework that simplifies the complexities of asynchronous I/O...
View ArticleImplementing GraphQL Mutation Without Returning Data
1. Introduction GraphQL is a powerful query language for APIs and provides a flexible and efficient way to interact with our data. When dealing with mutations, it’s typical to perform updates or...
View ArticleModify and Print List Items With Java Streams
1. Overview When we work with Java, manipulating lists is a fundamental skill. In this quick tutorial, we’ll explore different ways to modify or transform a list and then print its elements in Java. 2....
View ArticleCount the Number of Unique Digits in an Integer using Java
1. Overview In this short tutorial, we’ll explore how to count the number of unique digits in an integer using Java. 2. Understanding the Problem Given an integer, our goal is to count how many unique...
View ArticleQuery Hints in Spring Data JPA
1. Introduction In this tutorial, we’ll explore the fundamentals of query hints in Spring Data JPA. These hints help to optimize database queries and potentially improve application performance by...
View ArticleGenerate Juggler Sequence in Java
1. Overview The juggler sequence stands out for its intriguing behavior and elegant simplicity. In this tutorial, we’ll understand the juggler sequence and explore how to generate the sequence using a...
View ArticleJava Weekly, Issue 532
1. Spring and Java >> Bending pause times to your will with Generational ZGC [netflixtechblog.com] The surprising and not-so-surprising benefits of generational ZGC: reduced tail latencies,...
View ArticleMigrate Application from Spring Security 5 to Spring Security 6/Spring Boot 3
1. Overview Spring Security 6 comes with several major changes, including the removal of classes, and deprecated methods, and the introduction of new methods. Migrating from Spring Security 5 to Spring...
View ArticleDocument Query Parameters with Spring REST Docs
1. Overview Documentation is crucial for any piece of code that we intend to share with the world, especially if this code is relatively complex. Good API documentation not only attracts developers to...
View ArticleIntroduction to JFreeChart
1. Overview In this tutorial, we’ll see how to use JFreeChart, a comprehensive Java library for creating a wide variety of charts. We can use it to integrate graphical data representations into a Swing...
View ArticleFinding the Parent of a Node in a Binary Search Tree with Java
1. Introduction A Binary Search Tree (BST) is a data structure that helps us efficiently solve real-world problems. In this post, we’ll look at how to solve the problem of finding the parent of a node...
View Article