Auto Generate Created and Modified Date Time in Spring Boot

In the world of Spring Boot development, efficient data management is crucial for application performance and maintainability. One powerful feature offered by Spring Data JPA is the ability to automatically track the creation and modification timestamps of entities. In this … Read More

Handle Null Values in QueryDSL Projections

QueryDSL is a powerful library for building type-safe SQL-like queries in Java, especially in conjunction with JPA (Java Persistence API). When working with projections, it’s common to encounter situations where some fields might be null in the database, and handling … Read More

Spring Data JPA Projection

Spring Data JPA has become a cornerstone for Java developers, simplifying the way data is accessed and managed in relational databases. One of its powerful features is projection, which allows developers to shape query results according to their needs. In … Read More

Concat Column in MySQL

In the world of relational databases, the need to combine or concatenate values from different columns often arises. This task can be accomplished using the SQL SELECT query along with either the CONCAT or CONCAT_WS function. In this blog post, … Read More

(Solved) Java 8 date/time types are not supported by default

Java 8 introduced a new Date and Time API that brought significant improvements over the old java.util.Date and java.util.Calendar classes. However, when working with Jackson, we might encounter an issue where Java 8 date/time types are not supported by default. … Read More

java.nio Package in Java

The java.nio package provides a set of APIs for efficient non-blocking input/output (I/O) operations. Java NIO, short for New I/O, was introduced in Java 1.4 as an alternative to the traditional I/O package (java.io). The NIO API is based on … Read More

Understanding String Interning in Java

String interning in Java is a process which optimizes memory consumption by storing only one copy of each unique string value. Instead of creating a new object every time a string is defined, Java checks if the string already exists … Read More

Software Engineering Introduction

Software engineering is the application of engineering principles to the design, development, and maintenance of software. It is a systematic approach to the development of software that aims to produce high-quality, reliable, and maintainable software. What is software engineering? Software … Read More

How to use Comparator with Array in Java?

In the following example, we’ve defined two custom comparators: AscendingComparator and DescendingComparator. These comparators implement the Comparator interface and override the compare method to provide the desired comparison logic. We then use these comparators to sort an array of integers … Read More