Checking if an Element is the Last Element While Iterating Over an Array
1. Overview When working with arrays in Java, there are situations where we need to identify whether the current element in an iteration is the last one. In this tutorial, let’s explore a few common...
View ArticleStored Procedures With Spring JdbcTemplate
1. Overview In this tutorial, we’ll discuss the Spring JDBC framework’s JdbcTemplate class’s ability to execute a database stored procedure. Database stored procedures are similar to functions. While...
View ArticleIntegrating Firebase Authentication With Spring Security
1. Overview In modern web applications, user authentication and authorization are critical components. Building our authentication layer from scratch is a challenging and complex task. However, with...
View ArticleHow to Print the Content of an Array in Java
1. Overview In Java, an array is a static data structure that stores elements of the same type in contiguous memory locations. This arrangement ensures that elements are stored sequentially in memory...
View ArticleJava Weekly, Issue 559
1. Spring and Java >> Java 23: What’s New? [foojay.io] A quick overview of the main features to expect in Java 23. Lots of good stuff coming. >> Reuse Testcontainers initialization and...
View ArticleProgrammatic Usage of NetBeans Profiler
1. Overview Profiling an application provides deep insight into its behavior during the runtime. There are various popular profilers in the Java ecosystems such as NetBeans Profiler, JProfiler, and...
View ArticleIntroduction to Traefik
1. Introduction Traefik is a modern reverse proxy and load balancer designed to streamline and optimize the deployment and management of microservices. In this tutorial, we’ll explore what Traefik is,...
View ArticleMigrate HttpStatus to HttpStatusCode in Spring Boot 3
1. Overview In this article, we’ll look at how to use HttpStatusCode in Spring Boot applications, focusing on the most recent enhancements introduced in version 3.3.3. With these enhancements,...
View ArticleRetries With Kafka Producer
1. Overview In this short article, we’ll explore KafkaProducer’s retry mechanism and how to tailor its settings to fit specific use cases. We’ll discuss the key properties and their default values, and...
View ArticleHow to Stop or Limit Indexing in Intellij IDEA
1. Overview IntelliJ IDEA relies heavily on indexing to deliver its intelligent features. Every time files are modified or opened, IntelliJ scans the project files to build an internal index. This...
View ArticleRead and Write to IBM MQ Queue Using Java JMS
1. Introduction In this tutorial, we’ll learn how to use Java JMS (Java Message Service) to read and write messages from IBM MQ queues. 2. Setting up the Environment To avoid the complexities of manual...
View ArticleHow to Check if a Number Is a Palindrome in Java
1. Overview As we know, a number is a palindrome if it remains the same when its digits are reversed. In this tutorial, we’ll explore different ways to check if a number is a palindrome, including...
View ArticleIntro to MongoDB Atlas
1. Introduction MongoDB is a popular NoSQL database that offers scalability, performance, high availability, and support for real-time data processing. In this introductory article, we’ll discuss about...
View ArticleUsing MockMvc With SpringBootTest vs. Using WebMvcTest
1. Overview Let’s dive into the world of Spring Boot testing! In this tutorial, we’ll take a deep dive into the @SpringBootTest and @WebMvcTest annotations. We’ll explore when and why to use each one...
View ArticleHow to Sort a List of Pair
1. Overview In Java, we often have to work with data in pairs, and the Apache Commons Lang3 library provides a convenient Pair class for this purpose. When we have a list of Pair<String,...
View ArticleChange Field Value Before Update and Insert in Hibernate
1. Overview It’s common to have a scenario where we need to change a field value before persisting the entity to the database when working with Hibernate. Such scenarios could arise from user...
View ArticleFinding the Closest Number to a Given Value From a List of Integers in Java
1. Overview When we work with integer Lists in Java, one common problem we may encounter is finding the number in a List that is closest to a given value. In this tutorial, we’ll explore different ways...
View ArticleAsserting REST JSON Responses With REST-assured
1. Overview When we’re testing HTTP endpoints that return JSON we want to be able to check the contents of the response body. Often we want to capture examples of this JSON and store it in formatted...
View ArticleCombine Date and Time from Separate Variables in Java
1. Introduction In Java, it’s common to handle dates and times separately, especially when these components come from different sources. However, there are situations where we need to combine a...
View ArticleDeep Dive Into JVM Tools: Dynamic Attach and Serviceability Agent
1. Introduction Java Virtual Machine (JVM) serviceability tools, such as Dynamic Attach and the Serviceability Agent, are invaluable for managing Java applications in complex production environments....
View Article