Install OpenJDK on Windows
1. Overview Java plays a pivotal role in modern software development, empowering many applications and systems. To harness the power of Java on our machine, we need to install the Java Development Kit...
View ArticleOAuth2 Backend for Frontend With Spring Cloud Gateway
1. Overview In this tutorial, we’ll implement the OAuth2 Backend for Frontend (BFF) pattern with Spring Cloud Gateway and spring-addons. If we inspect any of the major websites known for using OAuth2...
View ArticleSimple Web Server in Java 18
1. Overview Starting in Java 18 we’ve access to the Simple Web Server, which was introduced in JEP 408. We can access its functionality through a command line tool and an API. The Simple Web Server...
View ArticleMessage Acknowledgement in Spring Cloud AWS SQS v3
1. Overview Acknowledgment of messages is a standard mechanism within messaging systems, signaling to the message broker that the message has been received and should not be delivered again. In...
View ArticleFind an Unique Email Address in a List
1. Introduction Email addresses make application software more efficient in user identification and communication. In the case of a list of email addresses, the distinction between unique addresses and...
View ArticleCreate JavaType From Class with Jackson
1. Introduction While working with Jackson, we might face situations where we’ll have to produce a JavaType from the given Class object. In this tutorial, we’ll see how to create a JavaType from a...
View ArticleIncrease the Memory Size Limit on IntelliJ IDEA
1. Overview IntelliJ IDEA is a popular integrated development environment (IDE) with robust features and capabilities. However, as projects become complex, we may encounter scenarios in which the...
View ArticleHow to Pretty-Print a Map in Java
1. Introduction Pretty-printing a Map in Java involves formatting and displaying the key-value pairs of the map in a visually appealing and readable manner. While Java doesn’t provide a built-in method...
View ArticleWorking With Microsoft Excel in Java
1. Overview In this tutorial, we’ll demonstrate the use of the Apache POI, JExcel, and Fastexcel APIs for working with Excel spreadsheets. These libraries can be used to dynamically read, write and...
View Article@DataJpaTest and Repository Class in JUnit
1. Introduction When working with Spring Boot applications that utilize Spring Data JPA for data persistence, it’s crucial to test the repositories that interact with the database. In this tutorial,...
View ArticleTestcontainers 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 Article