Remove All Elements From a String Array in Java
1. Overview In Java, working with arrays is a common task when dealing with collections of data. Sometimes, we may find ourselves in situations where we need to remove all elements from a String array....
View ArticleAccessing Emails From Gmail Using IMAP
1. Overview Webmail apps such as Gmail rely on protocols like the Internet Message Application Protocol (IMAP) to retrieve and manipulate email from an email server. In this tutorial, we’ll explore how...
View ArticleThe Road to Membership and Baeldung Pro
Context. If you’re curious how Baeldung works The TLDR is that the solution to the To Many Ads problem is live. Baeldung Pro is the membership that solves that, along with the other super-requested...
View ArticleA Guide to Fallback Beans in Spring Framework
1. Overview In this tutorial, we’ll discuss the concept of fallback beans in the Spring Framework. Fallback beans were introduced in Spring Framework version 6.2.0-M1. They provide an alternative...
View ArticleON CONFLICT Clause for Hibernate Insert Queries
1. Overview In this tutorial, we’ll learn about the ON CONFLICT clause for insert queries introduced in Hibernate 6.5. We use an ON CONFLICT clause to handle table constraint violations while inserting...
View ArticleGenerate MS Word Documents Using poi-tl Template
1. Overview The poi-tl library is an open-source Java library based on Apache POI. It simplifies generating Word documents using templates. The poi-tl library is a Word template engine that creates new...
View ArticleJDBC PreparedStatement SQL IN clause
1. Introduction A common use case while querying the database is to find a match for a column based on a list of input values. There are multiple ways to do this. The IN clause is one of the ways to...
View ArticleCalculate Percentage Difference Between Two Numbers in Java
1. Overview In this tutorial, we’ll learn how to calculate the percentage difference between two numbers in Java. Before looking at the implementation, we’ll define the mathematical concept of...
View ArticleIntegrate OpenAPI With Spring Cloud Gateway
1. Overview Documentation is an essential part of building any robust REST APIs. We can implement API documentation based on the OpenAPI specification and visualize that in Swagger UI in Spring...
View ArticleJava Weekly, Issue 556
1. Spring and Java >> WebAssembly the Safer Alternative to Integrating Native Code in Java [infoq.com] How WebAssembly (Wasm) offers a portable and secure solution, allowing native code to run...
View ArticleReverse Row of a 2d Array in Java
1. Introduction In this tutorial, we’ll understand the problem of reversing rows of a 2d array and solve it using a few alternatives using built-in Java libraries. 2. Understanding the Problem Using 2d...
View ArticleEnsuring Type Safety With Collections.checkedXXX() in Java
1. Introduction In this article, we’ll explore the Collections.checkedXXX() methods, demonstrating how they can help catch type mismatches early, prevent bugs, and enhance code maintainability. In...
View ArticleGetting Request Payload from POST Request in Java Servlet
1. Introduction Extracting payload data from the request body effectively is crucial for Java servlets, which act as server-side components handling incoming HTTP requests. This guide explores various...
View ArticlePGP Encryption and Decryption Using Bouncy Castle
1. Overview Security is paramount in software applications where encryption and decryption of sensitive and personal data are basic requirements. All of these cryptographic APIs are included with the...
View ArticleDynamic Client Registration in Spring Authorization Server
1. Introduction The Spring Authorization Server comes with a range of sensible defaults that allow us to use it with almost no configuration. This makes it a great choice for using with client...
View ArticleHow to Retrieve a List of Available Folders in a Mail Account Using JavaMail
1. Overview Email management often involves developers working with email folders to organize, read, and manage emails. Using the JavaMail API, retrieving a list of available folders from a mail...
View ArticleChecking if a StringBuilder is Null or Empty
1. Overview StringBuilder allows us to build String values efficiently and conveniently. When working with StringBuilder in Java, there are situations where we need to verify whether it is null or...
View ArticleUsing Amazon Textract in Spring Boot to Extract Text From Images
1. Overview Businesses often need to extract meaningful data from various types of images, such as processing invoices or receipts for expense tracking, identity documents for KYC (Know Your Customer)...
View ArticleSpring Cloud Function for Azure Function
1. Overview In this tutorial, we’ll learn how to use the Spring Cloud Function(SCF) framework to develop Java applications that can be deployed in Microsoft Azure Functions. We’ll discuss its key...
View ArticleHow to Fix the “Could not create the Java Virtual Machine” Error
1. Overview Java programs run on a JVM (Java Virtual Machine), allowing them to run almost everywhere, from application servers to mobile phones. If Java is installed properly, we can run applications...
View Article