Java, Spring Boot
August 15, 2023

Usage of Spring Properties File

Introduction Properties files enable you to configure and update your application with different settings separately. You can define and utilize multiple properties files within your application. In this article, we will demonstrate how to define properties files and how to retrieve values from them within your application. Let’s begin by categorizing the usage of properties […]

Java
August 13, 2023

Usage of the Java Optional Class

Overview The Java Optional class is an elegant container for handling null values. Introduced in Java 8 and added to the Java.util package, the Optional class eliminates the need for numerous null value checks to protect your application from NullPointerExceptions at runtime. Before the Optional class, many developers used null or exceptions to indicate the […]

Java
August 05, 2023

What are Java Path and Classpath?

Introduction Java PATH and CLASSPATH are the two most important environment variables of the Java runtime used to locate JDK binary files for compiling and running Java on both Windows and Linux. They also help find the compiled Java bytecode files known as class files. What is Java PATH and How to Add It? Java […]

Java
August 03, 2023

What is the .m2 folder in Maven?

The “.m2” folder is a directory created by Apache Maven, a popular build and dependency management tool for Java projects. In this directory, Maven stores its local repository, which is used to cache and manage project dependencies. There are three types of Maven repositories: When you build a Maven project, Maven automatically downloads the required […]

Java, Spring Boot
July 31, 2023

Spring Boot @Transactional: Rollback and Propagation Strategies

What Is a Transaction? A “transaction” is a fundamental concept in the field of database management and refers to a sequence of one or more operations that are executed as a single unit of work. In the context of databases, a transaction ensures that a group of database operations is performed in an all-or-nothing manner, […]

Java
July 25, 2023

JVM Tuning and Performance Optimization

1. Introduction to JVM Optimization The Java Virtual Machine (JVM) is a fundamental component of the Java platform, enabling the execution of Java programs on different operating systems and architectures. Understanding the JVM’s architecture and its role in executing Java bytecode is crucial for Java developers to build platform-independent and robust applications. The JVM is […]

Java
July 22, 2023

Understanding Java Exceptions: A Comprehensive Guide

1. Introduction Start a Java Exception Handling Adventure. Uncover the Basics and Avoid Common Pitfalls. In this article, we will demonstrate the significance of exceptions in Java and showcase best practices. 2. What Is An Exception? In Java, an exception is an unexpected or exceptional event that occurs during the execution of a program, disrupting […]

Java
July 19, 2023

Static Factory Methods in Java

The traditional method used to create an object from a class is by providing a public constructor. However, besides this method, there is another technique that programmers should be aware of. You can write a public static factory method for a class. This method simply returns an instance of that class. One example of this […]

Obfuscate Spring Boot Applications with Proguard Maven Plugin

ProGuard ProGuard is an open-sourced Java class file shrinker, optimizer, obfuscator, and preverifier. As a result, ProGuard processed applications and libraries are smaller, faster, and somewhat hardened against reverse engineering. (Proguard Manual) ProGuard is an open-source and free tool that allows you to shrink, optimize and obfuscate Java-based codes. It detects unused classes, fields, methods, […]