How to Mock Amazon S3 for Integration Test
1. Introduction In this article, we’ll learn how to mock Amazon S3 (Simple Storage Service) to run integration tests for Java applications. To demonstrate how it works, we’ll create a CRUD (create,...
View ArticleSerialization with FlatBuffers in Java
1. Introduction In this tutorial, we’ll explore FlatBuffers in Java and perform serialization and deserialization using it. 2. Serialization in Java Serialization is the process of converting Java...
View ArticleGet the Initials of a Name in Java
1. Introduction When handling names, it can be beneficial to shorten them into abbreviated strings using each word’s first character. In this tutorial, let’s look at different ways to implement this...
View ArticleSimplified Array Operations on JsonNode Without Typecasting in Jackson
1. Overview Working with JSON (JavaScript Objеct Notation) in Java often involves using librariеs like Jackson, which provides various classеs to rеprеsеnt this type of data, such as JsonNodе,...
View ArticleBlowfish Encryption Algorithm
1. Overview Originally designed as an alternative to the DES encryption algorithm, the Blowfish encryption algorithm is one of the most popular encryption algorithms available today. Blowfish is a...
View ArticleSpring Security AuthorizationManager
1. Introduction Spring Security is an extension of the Spring Framework that makes it easy to build common security practices into our applications. This includes things like user authentication and...
View ArticleOpenAPI Generator Custom Templates
1. Introduction OpenAPI Generator is a tool that allows us to quickly generate client and server code from REST API definitions, supporting multiple languages and frameworks. Although most of the time...
View ArticleFinding the Majority Element of an Array in Java
1. Introduction In this tutorial, we’ll explore different approaches to finding the majority element within an array. For each approach, we’ll provide their respective code implementations and analysis...
View ArticleFinding the Peak Elements of a List
1. Introduction Peak elements within an array are important for numerous algorithms, offering valuable insights into the dataset’s characteristics. In this tutorial, let’s explore the concept of peak...
View ArticleObtaining the Last Path Segment of a URI in Java
1. Introduction Working with Uniform Resource Identifiers (URIs) is a common operation that is mostly used in web development and file management. Besides, one of the most common needs is to get the...
View ArticleIntro to the Apache Commons CLI
1. Overview In this tutorial, we’ll explore the Java Apache Commons CLI library. It’s a framework that empowers developers by helping them build the command line interface (CLI) of existing software...
View ArticleJava Dates Tutorial
/*! elementor - v3.19.0 - 28-02-2024 */ .elementor-widget-image{text-align:center}.elementor-widget-image a{display:inline-block}.elementor-widget-image a...
View ArticleCheck if a Number Is a Happy Number in Java
1. Overview We often solve mathematical problems in programming. Determining whether a number is a happy number is an interesting task. In this tutorial, we’ll understand how a happy number is defined...
View ArticleIntroduction to Redpanda
1. Overview In this tutorial, we’ll discuss a potent event streaming platform called Redpanda. It’s a competition to the de facto industry streaming platform Kafka and, interestingly, it’s also...
View ArticleHow to Autowire a Spring Bean in a Servlet Filter
1. Introduction Servlet filters offer a powerful mechanism for intercepting and manipulating incoming requests. However, accessing Spring-managed beans within these filters can pose a challenge. In...
View ArticleCapturing Method Arguments When Running Spock Tests
1. Introduction When we test our code, we sometimes want to capture the parameters passed to our method. In this tutorial, we’ll learn how to capture arguments in a Spock test using Stubs, Mocks, and...
View ArticleRGB Representation as an Integer in Java
1. Introduction The RGB color model is widely used in various applications and devices because it aligns well with how electronic displays work. ‘R’ in RGB stands for Red, ‘G’ for Green, and ‘B’ for...
View ArticleJava Weekly, Issue 533
1. Spring and Java >> Function Calling in Java and Spring AI using the latest Mistral AI API [spring.io] Integrating LLM with external tools: exploring advanced function calling in Java and...
View ArticleParsing HTML Table in Java With Jsoup
1. Overview Jsoup is an open-source library used to scrape HTML pages. It provides an API for data parsing, extraction, and manipulation using DOM API methods. In this article, we will see how to parse...
View ArticleRefresh and Fetch an Entity After Save in JPA
1. Introduction Java Persistence API (JPA) acts as a bridge between Java objects and relational databases, allowing us to persist and retrieve data seamlessly. In this tutorial, we’ll explore various...
View Article