Java Weekly, Issue 526
1. Spring and Java >> How to use the Java CountDownLatch [vladmihalcea.com] How to use the Java CountDownLatch to write test cases that take concurrency into consideration. A good read as always....
View ArticleMonkey Patching in Java
1. Introduction In software development, we often need to adapt and enhance our systems’ existing functionalities. Sometimes, modifying the existing codebase may not be possible or may not be the most...
View ArticleSet an Environment Variable at Runtime in Java
1. Overview Java provides a simple way of interacting with environment variables. We can access them but cannot change them easily. However, in some cases, we need more control over the environment...
View ArticleConvert Gregorian to Hijri Date in Java
1. Overview The Gregorian and Hijri calendars represent two distinct systems for measuring time. In this tutorial, we’ll look at various approaches to converting a Gregorian Date to a Hijri Date. 2....
View ArticleCreating Unicode Character From Its Code Point Hex String
1. Overview Java’s support for Unicode makes it straightforward to work with characters from diverse languages and scripts In this tutorial, we’ll explore and learn how to obtain Unicode characters...
View ArticleN+1 Problem in Hibernate and Spring Data JPA
1. Overview Spring JPA and Hibernate provide a powerful tool for seamless database communication. However, because clients delegate more control to the frameworks, the resulting generated queries might...
View ArticleRegular Expression for Password Validation in Java
1. Introduction Regarding cybersecurity, password validation is essential in protecting users’ accounts. Moreover, using regular expressions (regex) in Java provides a powerful and dynamic way of...
View ArticleConvert Long to Date in Java
1. Overview When working with dates in Java, we often see date/time values expressed as long values that denote the number of days, seconds, or milliseconds since the epoch, January 1, 1970, 00:00:00...
View ArticleGetting Started With TimescaleDB
1. Overview In this article, we’ll explore TimescaleDB, an open-source time-series database built on top of PostgreSQL. We’ll delve into its features, examine its capabilities, and discuss how to...
View ArticlePrint a Java 2D Array
1. Overview In this tutorial, we’ll get familiar with some ways to print 2D arrays, along with their time and space complexity. 2. Common Ways to Print a 2D Array Java, a versatile programming...
View ArticleStructured Logging in Java
1. Introduction Application logs are important resources for troubleshooting, measuring performance, or simply checking the behavior of a software application. In this tutorial, we’ll learn how to...
View ArticleDifference Between “mvn verify” and “mvn test”
1. Overview Maven is a build tool for Java development, and understanding its commands, particularly mvn verify and mvn test, is crucial for developers. In this tutorial, we’ll delve into these...
View ArticleStoring PostgreSQL JSONB Using Spring Boot and JPA
1. Overview This tutorial will provide us with a comprehensive understanding of storing JSON data in a PostgreSQL JSONB column. We’ll quickly review how we cope with a JSON value stored in a variable...
View ArticleAccess Job Parameters From ItemReader in Spring Batch
1. Overview Spring Batch is a powerful framework for batch processing in Java, thus making it a popular choice for data processing activities and scheduled job runs. Depending on the business logic...
View ArticleCustom JSON Deserialization Using Spring WebClient
1. Overview In this article, we’ll explore the need for custom deserialization and how this can be implemented using Spring WebClient. 2. Why Do We Need Custom Deserialization? Spring WebClient in the...
View ArticleJava Weekly, Issue 527
1. Spring and Java >> JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [openjdk.org] Primitive type patterns in all pattern contexts, and extend instanceof and switch to...
View ArticleEvent-Driven Microservices With Orkes Conductor
1. Introduction In this tutorial, we’ll explore how to build event-driven microservices using the Orkes Conductor and Spring. We’ll use Conductor to orchestrate microservices using HTTP endpoints and...
View ArticleRead and Write Files in Java Using Separate Threads
1. Introduction When it comes to file handling in Java, it can be challenging to manage large files without causing performance issues. That’s where the concept of using separate threads comes in. By...
View ArticleShutting Down on OutOfMemoryError in Java
1. Overview Maintaining an application in a consistent state is more important than keeping it running. It’s true for the majority of cases. In this tutorial, we’ll learn how to explicitly stop the...
View ArticleDisplay Image With Thymeleaf
1. Overview Thymeleaf is a popular Java template engine that’s compatible with the Spring framework to generate HTML views. One of the main features of a web application is rendering an image. Spring...
View Article