Configuring Message Retention Period in Apache Kafka
1. Overview When a producer sends a message to Apache Kafka, it appends it in a log file and retains it for a configured duration. In this tutorial, we'll learn to configure time-based message...
View ArticleHow To Configure Java Heap Size Inside a Docker Container
1. Overview When we run Java within a container, we may wish to tune it to make the best use of the available resources. In this tutorial, we'll see how to set JVM parameters in a container that runs a...
View ArticleOverride Maven Plugin Configuration from Parent
1. Overview In a Maven multi-module project, the effective POM is the result of merging all configurations defined within a module and its parents. In order to avoid redundancies and duplication...
View ArticleWhere Does Java’s String Constant Pool Live, the Heap or the Stack?
1. Introduction Whenever we declare a variable or create an object, it is stored in the memory. At a high level, Java divides the memory into two blocks: stack and heap. Both memories store specific...
View ArticleHow to Use Visual Studio Code with Java?
1. Overview In this article, we'll learn how to configure Visual Studio Code with Java, and how to use its basic features for this language. Then, we'll see the Maven and Gradle integrations and...
View ArticleWrite Extracted Data to a File Using JMeter
1. Overview In this tutorial, let's explore two methods to extract data from Apache JMeter and write it into an external file. 2. Setting up a Basic JMeter Script Let's now start by creating a basic...
View ArticleOptimizing HashMap’s Performance
1. Introduction HashMap is a powerful data structure that has a broad application, especially when fast lookup time is needed. Yet, if we don't pay attention to details, it can get suboptimal. In this...
View ArticleJava Deque vs. Stack
1. Overview The Java Stack class implements the stack data structure. Java 1.6 introduced the Deque interface, which is for implementing a “double-ended queue” that supports element insertion and...
View ArticleREST API: JAX-RS vs Spring
1. Overview In this tutorial, we'll see the difference between JAX-RS and Spring MVC for REST API development. 2. Jakarta RESTful Web Services To become part of the JAVA EE world, a feature must have a...
View ArticleJava Weekly, Issue 374
1. Spring and Java >> Optional.stream() [blog.frankel.ch] Streaming optional values – simplifying optional pipelines by converting them to streams! >> Initialization Strategies With...
View ArticleThe java.security.egd JVM Option
1.Overview When launching the Java Virtual Machine (JVM), there are various properties we can define that will alter how our JVM behaves. One such property is java.security.egd. In this tutorial, we'll...
View ArticleIntroduction to ZeroCode
1. Overview In this article, we will introduce the ZeroCode automated testing framework. We'll learn the fundamentals through an example of REST API testing. 2. The Approach The ZeroCode framework...
View ArticleConverting java.util.Properties to HashMap
1. Introduction Many developers decide to store application parameters outside the source code. One of the ways to do so in Java is to use an external configuration file and read them via the...
View ArticleInsert a Row in Excel Using Apache POI
1. Overview Sometimes, we might need to manipulate Excel files in a Java application. In this tutorial, we'll look specifically at inserting a new row between two rows in an Excel file using the Apache...
View ArticleA Quick Intro to the Kubernetes Java Client
1. Introduction In this tutorial, we'll show how to use the Kubernetes API from Java applications using its official client library. 2. Why Use the Kubernetes API? Nowadays, it is safe to say that...
View ArticleSpring @EntityScan vs. @ComponentScan
1. Introduction When writing our Spring application we might need to specify a certain list of packages that contain our entity classes. Similarly, at some point, we would need only a specific list of...
View ArticleInvoking a Private Method in Java
1. Overview While methods are made private in Java to prevent them from being called from outside the owning class, we may still need to invoke them for some reason. To achieve this, we need to work...
View ArticleJava Weekly, Issue 375
1. Spring and Java >> Monitoring Deserialization to Improve Application Security [inside.java] Meet JFR deserialization event – a new addition in Java 17 to monitor deserialization events in a...
View ArticleAdding Interceptors in OkHTTP
1. Overview Typically when managing the request and response cycle of the HTTP requests in our web applications, we'll want a way to tap into this chain. Usually, this is to add some custom behaviour...
View ArticleA Guide to SAML with Spring Security
1. Overview In this tutorial, we'll explore Spring Security SAML with Okta as an identity provider (IdP). 2. What Is SAML? Security Assertion Markup Language (SAML) is an open standard that allows an...
View Article