Filter a List by Any Matching Field
1. Overview We often need to filter a List of objects by checking if any of their fields match a given String in many real-world Java applications. In other words, we want to search for a String and...
View ArticleConfigure CORS Policy for Spring Cloud Gateway
1. Overview Cross-Origin Resource Sharing (CORS) is a security mechanism for browser-based applications that allows a web page from one domain to access another domain’s resources. The browser...
View ArticleMock Nested Method Calls Using Mockito
1. Overview In this tutorial, we’ll see how to mock nested method calls using Mockito stubs, specifically deep stubs. To learn more about testing with Mockito, check out our comprehensive Mockito...
View ArticleGet a List of IP Connected in Same Network (Subnet) using Java
1. Introduction In networking, retrieving the list of IP addresses connected within the same network (subnet) is essential for tasks such as network monitoring and device administration. Additionally,...
View ArticleFormatting Java Code From the Command Line
1. Overview Despite the ability to format code within an Integrated Development Environment (IDE), we might want to use command-line formatters to automate the process of formatting code. Therefore, we...
View ArticleConversion from POJO to Avro Record
1. Introduction When working with Apache Avro in Java applications, we often need to convert Plain Old Java Objects (POJOs) to their Avro equivalent. While it’s perfectly acceptable to do this manually...
View ArticleEntityManagerFactory vs. SessionFactory
1. Introduction In this tutorial, we’ll explore the similarities and differences between SessionFactory and EntityManagerFactory. As their names suggest, both are factory classes used to create objects...
View ArticleIntellij Idea – How to Build Project Automatically
1. Introduction IntelliJ IDEA is a powerful IDE for Java and other JVM-based languages, offering numerous features to enhance productivity. One key feature allows IntelliJ IDEA to automatically build...
View ArticleLogstash vs. Kafka
1. Overview Logstash and Kafka are two powerful tools for managing real-time data streams. While Kafka excels as a distributed event streaming platform, Logstash is a data processing pipeline for...
View ArticleIntroduction to Apache Commons Validator
1. Overview In this tutorial, we’ll learn the basics of Apache Commons Validator, a powerful library from Apache Commons. It simplifies data validation in Java applications. Firstly, we will understand...
View ArticleGet the Schema From an Avro File
1. Introduction In this tutorial, we’ll explore how to extract the schema from an Apache Avro file in Java. Furthermore, we’ll cover how to read data from Avro files. This is a common requirement in...
View ArticleJava Weekly, Issue 565
1. Spring and Java >> Exploring New Features in JDK 23: Just-Write-And-Run prototyping with JEP-477 not only for beginners [foojay.io] Quick prototyping made much easier with JDK 23. A long time...
View ArticleValidation Using Yavi
1. Introduction Yavi is a Java validation library that allows us to easily and cleanly ensure that our objects are in a valid state. Yavi is an excellent lightweight choice for object validation within...
View ArticleInvoke a GoLang Function from Java
1. Introduction As we know, Java and Go are two prominent programming languages, each excelling in different domains. Java is renowned for its portability and extensive ecosystem, while Go is...
View ArticleIntroduction to Apache Iceberg
1. Introduction This tutorial will discuss Apache Iceberg, a popular open table format in today’s big data landscape. We’ll explore Iceberg’s architecture and some of its important features through a...
View ArticleHow to Mock Multiple Responses for the Same Request
1. Overview In this article, we’ll explore how to mock multiple responses for the same request using MockServer. A MockServer simulates real APIs by mimicking their behavior, allowing us to test...
View ArticleGuide to Prometheus Java Client
1. Introduction As distributed systems become more complex, monitoring becomes crucial to maintaining application performance and quickly identifying issues. One of the best tools for this is...
View ArticleAspectJ Pointcut For All Methods Inside Package
1. Overview AspectJ is a powerful tool for handling cross-cutting concerns like logging, security, and transaction management in Java applications. A common use case is applying an aspect to all...
View ArticleIntroduction to Jakarta Persistence 3.2
1. Introduction Jakarta Persistence (formerly JPA) is the standard API for object-relational mapping in Java. It enables developers to manage relational data in Java applications and simplifies...
View ArticleIntroduction to S3proxy
1. Overview Amazon S3 has cemented itself as the most widely used cloud storage backend due to its scalability, durability, and extensive feature set. This is evident by the fact that many other...
View Article