TestContainers With MongoDB in Java
1. Overview Test containers help us to spin up containers before running tests and stop them afterward by defining them in our code. In this tutorial, we’ll take a look at configuring TestContainers...
View ArticleIntroduction to Hibernate Reactive
1. Overview Reactive programming is a programming paradigm emphasizing the principles of asynchronous data streams and non-blocking operations. The key objective is to build applications that can...
View ArticleChecking Write Permissions of a Directory in Java
1. Introduction In Java, interacting with file systems for reading, writing, or other manipulation is a common task. Managing files and directories often involves checking their permissions. In this...
View ArticleCalculate One’s Complement of a Number
1. Introduction One’s complement is a method for representing negative numbers in binary form by inverting all the bits of the number. It’s often used in networking protocols for error detection and...
View ArticleCreate an Instance of Generic Type in Java
1. Overview Generics provide an elegant way to introduce an additional layer of abstraction in our codebase while promoting code reusability and enhancing code quality. When working with generic data...
View Article@Valid Annotation on Child Objects
1. Introduction In this tutorial, we’ll understand how to use @Valid annotation to validate objects and their nested child objects. Validating incoming data can be straightforward when it is of a basic...
View ArticleMonitoring Hibernate Events With Java Flight Recorder
1. Overview In this tutorial, we’ll examine the process of using Java Flight Recorder to record events during Hibernate lifecycle execution. After that, we’ll use the JDK Mission Control tool from...
View ArticleConverting Exponential Value to a Number Format in Java
1. Introduction Handling and converting exponential or scientific notation into a readable number format in Java is a common requirement, especially in scientific computing, financial calculations, and...
View ArticleGuide to Finding Min and Max by Group Using Stream API
1. Introduction In this tutorial, we’ll see how to group elements by value and find their minimum and maximum values in each group. We’ll need a basic knowledge of Java 8 streams to understand this...
View ArticleA Guide to ConstructorDetector in Jackson
1. Introduction One of the essential aspects of working with Jackson is understanding how it maps JSON data to Java objects, which often involves using constructors. Besides, the ConstructorDetector is...
View ArticleFinding the Size of a Web File Using URLConnection in Java
1. Overview The HTTP protocol provides comprehensive information about requested web resources. One of its header fields, Content-Length, specifies the size of a resource in bytes. We can extract this...
View ArticleFind Distinct Rows Using Spring Data JPA
1. Overview In some situations, we need to fetch unique elements from the database. This tutorial focuses on querying distinct data with Spring Data JPA, examining various methods to retrieve distinct...
View ArticleImplement Bulk and Batch API in Spring
1. Overview Implementing standard REST APIs covers most of the typical use cases. However, there are some limitations in the REST-based architecture style for dealing with any bulk or batch operations....
View ArticleHow to Serialize and Deserialize java.sql.Blob With Jackson
1. Introduction In this article, we’ll see how we can serialize and deserialize java.sql.Blob using Jackson. The java.sql.Blob represents a Binary Large Object (Blob) in Java, which can store large...
View ArticleIntroduction to JetCache
1. Introduction In this article, we’re going to look at JetCache. We’ll see what it is, what we can do with it, and how to use it. JetCache is a cache abstraction library that we can use on top of a...
View ArticlePacked Repeated Fields in Protobuf in Java
1. Overview In this tutorial, we’ll discuss packed repeated fields in Google’s Protocol Buffer (protobuf) messages. Protocol Buffers help define highly optimized language-neutral and platform-neutral...
View ArticleHow to Insert an Emoji in a Java String
1. Introduction In modern applications, incorporating emojis into text enhances the user experience significantly. Moreover, working with emojis requires understanding Unicode and how Java handles text...
View ArticleAutomated Visual Regression Testing Over Scalable Cloud Grid
1. Overview Automated visual regression testing over a scalable cloud grid offers a powerful solution for ensuring web applications’ visual integrity and consistency across various browsers, devices,...
View ArticleAvoid “No Multipart Boundary Was Found” in Spring
1. Introduction In this tutorial, we’ll learn about the common error “No Multipart Boundary Was Found” when handling multipart HTTP messages in Spring. We’ll learn how to properly configure such...
View ArticleUpcasting Vs. Downcasting in Java
1. Introduction Understanding how to handle objects within Java’s type hierarchy is essential for writing flexible and maintainable code. Two fundamental concepts in this area are upcasting and...
View Article