Overriding Spring Boot Managed Dependency Versions
1. Introduction Spring Boot is an excellent framework for quickly starting new projects. One of the ways it helps developers quickly create new applications is by defining a set of dependencies...
View ArticleWhat Is the –release Option in the Java 9 Compiler?
1. Overview In this tutorial, we'll learn about Java 9's new command-line option –release. The Java compiler running with the –release N option automatically generates class files compatible with Java...
View ArticleSplitting a Java String by Multiple Delimiters
1. Introduction We all know that splitting a string is a very common task. However, we often split using just one delimiter. In this tutorial, we'll discuss in detail different options for splitting a...
View ArticleSwitching Between Frames Using Selenium WebDriver in Java
1. Introduction Managing frames and iframes is a crucial skill for test automation engineers. Selenium WebDriver allows us to work with both frames and iframes in the same way. In this tutorial, we’ll...
View ArticleWhy Is sun.misc.Unsafe.park Actually Unsafe?
1. Overview Java provides certain APIs for internal use and discourages unnecessary use in other cases. The JVM developers gave the packages and classes names such as Unsafe, which should warn...
View ArticleHashSet toArray() Method in Java
1. Introduction HashSet is one of the common data structures that we can utilize in Java Collеctions. In this tutorial, we’ll dive into the toArray() method of the HashSet class, illustrating how to...
View ArticleConvert ResultSet Into Map
1. Introduction Java applications widely use the Java Database Connectivity (JDBC) API to connect and execute queries on a database. ResultSet is a tabular representation of the data extracted by these...
View ArticleMongoDB Atlas Search Using the Java Driver and Spring Data
1. Introduction In this tutorial, we’ll learn how to use Atlas Search functionalities using the Java MongoDB driver API. By the end, we’ll have a grasp on creating queries, paginating results, and...
View ArticleSharing Memory Between JVMs
1. Introduction In this tutorial, we’ll show how to share memory between two or more JVMs running on the same machine. This capability enables very fast inter-process communication since we can move...
View ArticleJava Weekly, Issue 516
1. Spring and Java >> Table partitioning with Spring and Hibernate [vladmihalcea.com] Splitting a large table into multiple smaller partition tables using Spring and Hibernate — allowing a more...
View ArticleSynchronize a Static Variable Among Different Threads
1. Overview In Java, it’s not uncommon to need synchronized access to static variables. In this short tutorial, we’ll look at several ways to synchronize access to static variables among different...
View ArticleCreate Table Using ASCII in a Console in Java
1. Overview The Java standard library provides the printf() and format() methods to output formatted data to the console. These two methods make it possible to create a table using ASCII characters in...
View ArticleRepresenting Furthest Possible Date in Java
1. Introduction There are scenarios where it’s essential to represent the furthest conceivable date value, particularly when dealing with default or placeholder dates. In this tutorial, we’ll learn how...
View ArticleHow to Avoid NoSuchElementException in Stream API
1. Overview In this short tutorial, we’ll explain how to avoid NoSuchElementException when working with the Stream API. First, we’re going to explain the main cause of the exception. Then, we’ll...
View ArticleEnsuring Message Ordering in Kafka: Strategies and Configurations
1. Overview In this article, we will explore the challenges and solutions surrounding message ordering in Apache Kafka. Processing messages in the correct order is crucial for maintaining data...
View ArticleExecutable Comments in Java
1. Overview Comments can be useful when we need additional notes in our code. They can help us make our code more understandable. Additionally, they can be especially useful in methods that perform...
View ArticleDifferences Between * and ? in Cron Expressions
1. Overview With a cron scheduler, we can automate repetitive tasks we’d otherwise need to handle manually. Additionally, the cron expression allows us to schedule jobs executing at the desired date...
View ArticleOverriding Spring Beans in Integration Test
1. Overview We might want to override some of our application’s beans in Spring integration testing. Typically, this can be done using Spring Beans specifically defined for testing. However, by...
View ArticleWorking with Exceptions in Java CompletableFuture
1. Introduction Java 8 has introduced a new abstraction based on Future to run asynchronous tasks – CompletableFuture class. It basically came to overcome the issues of the old Future API. In this...
View ArticleManage Kafka Consumer Groups
1. Introduction Consumer groups help to create more scalable Kafka applications by allowing more than one consumer to read from the same topic. In this tutorial, we’ll understand consumer groups and...
View Article