Extracting Text Between Parentheses in Java
1. Overview When we code in Java, there are many scenarios where we need to extract text enclosed within parentheses. Understanding how to retrieve the text between parentheses is an essential skill....
View ArticleReading CSV Headers Into a List
1. Overview In this short tutorial, we’ll explore different ways of reading CSV headers into a list in Java. First, we’ll learn how to do this using JDK classes. Then, we’ll see how to achieve the same...
View ArticleHow to Convert org.w3c.dom.Document to String in Java
1. Overview When handling XML in Java, we’ll often have an instance of a org.w3c.dom.Document that we need to convert to a String. Typically we might want to do this for a number of reasons, such as...
View ArticlegRPC Authentication in Java Using Application Layer Transport Security (ALTS)
1. Overview In this tutorial, we’ll explore the role of ALTS (Application Layer Transport Security) in gRPC applications. As we know, ensuring authentication and data security is difficult but...
View ArticleAutowiring an Interface With Multiple Implementations
1. Introduction In this article, we’ll explore autowiring an interface with multiple implementations in Spring Boot, ways to do that, and some use cases. This is a powerful feature that allows...
View ArticleRemoving Bracket Characters in a Java String
1. Overview When working with String values in Java, there are times when we need to clean up our data by removing specific characters. One common scenario is removing bracket characters. With the...
View ArticleEffective Scaling of Hot Application Instances with OpenJDK CRaC Help in...
1. Introduction In this tutorial, we’ll learn about Coordinated Restore at Checkpoint (CRaC), an OpenJDK project that allows us to start Java programs with a shorter time to the first transaction....
View ArticleIntroduction to Apache Nutch
1. Introduction In this tutorial, we’re going to have a look at Apache Nutch. We’ll see what it is, what we can do with it, and how to use it. Apache Nutch is a ready-to-go web crawler that we can use...
View ArticleReturn Auto Generated ID From Insert With MyBatis and Spring
1. Overview MyBatis is an open-source Java persistence framework that can be used as an alternative to JDBC and Hibernate. It helps us reduce code and simplifies the retrieval of the result, allowing...
View Articleconcat() vs. merge() Operators in RxJava Observables
1. Overview concat() and merge() are two powerful operators used to combine multiple Observable instances in RxJava. concat() emits items from each Observable sequentially, waiting for each to complete...
View ArticleIntroduction to BitcoinJ
1. Overview Cryptocurrency is a secure and decentralized value store. It adopts a peer-to-peer (P2P) network for propagation and verification of transactions. BitcoinJ is a Java library that simplifies...
View ArticleJava Weekly, Issue 544
1. Spring and Java >> Model Data, the Whole Data, and Nothing but the Data – Data Oriented Programming v1.1 [inside.java] An interesting look at how we can use Records and Sealed types to model...
View ArticleRemoving BOM Characters When Reading from File
1. Introduction The Byte Order Mark (BOM) indicates the encoding of a file but can cause issues if we don’t handle it correctly, especially when processing text data. Besides, it isn’t uncommon to...
View ArticleA Guide to Micrometer in Quarkus
1. Introduction Monitoring and observability are indispensable aspects of modern application development, especially in cloud-native and microservices architectures. Quarkus has emerged as a popular...
View ArticleEmbedded PostgreSQL for Spring Boot Tests
1. Overview Writing integration tests with databases offers several options for test databases. One effective option is to use a real database, ensuring that our integration tests closely mimic...
View ArticleConverting java.sql.Timestamp to java.util.Calendar
1. Introduction In this tutorial we’ll learn how to convert a java.sql.Timestamp object to a java.util.Calendar object. First, we’ll see how Java’s two classes, Timestamp and Calendar, handle time....
View ArticleUDP Messaging Using Aeron
1. Introduction In this article, we’re going to look at Aeron, a multi-language library maintained by Adaptive Financial Consulting, designed for efficient UDP messaging between applications. It’s...
View ArticleUsing Enum in Spring Data JPA Queries
1. Overview When building our persistence layer with Spring Data JPA, we often work with entities with enum fields. These enum fields represent a fixed set of constants, such as the status of an order,...
View ArticleInjecting a Mock as a Spring Bean in a Spock Spring Test
1. Introduction When we test Spring applications using Spock, we sometimes want to change the behavior of a Spring-managed component. In this tutorial, we’ll learn how to inject our own Stub, Mock, or...
View ArticleList Private Keys From a Keystore
1. Overview Managing and securing private keys is a critical aspect of many applications. Java Keystore (JKS) is a popular format for storing cryptographic keys and certificates. In this tutorial,...
View Article