Swift closure is a miniature block of code, like a pocket-sized function, that you can carry around and hand out whenever needed. It’s a self-contained chunk of functionality that can be assigned to variables, passed as arguments, and even returned from other functions. Also, closures in Swift are similar to blocks in Objective-C and other…
Read More Swift Closure: A Detailed Guide For Beginners
Exciting news! I am very happy to announce that my new view video course is launching soon. If you want to learn how to build Event-Driven Spring Boot Microservices with Apache Kafka, you do not want to miss this video course. What you’ll learn This video course is designed for absolute beginners, and the following…
Read More Apache Kafka for Spring Boot Microservices
In this tutorial, you will learn how to generate a custom JSON Web Token(JWT) and how to add and validate custom JWT Claims using the io.jsonwebtoken library. The JWT token generated in this tutorial will be signed with a SecretKey, making it secure and tamper-proof. Also, this tutorial assumes you have prior knowledge of creating…
Read More Generate JWT. Add and Validate Custom Claims.
What is JUnit 5? JUnit 5 is actually a combination of three main elements. It’s a mix of JUnit Platform, JUnit Jupiter API, and JUnit Vintage API. Let’s break it down. JUnit Platform Think of JUnit 5 as having a solid foundation called the JUnit Platform. This platform is like the engine that gets your…
Read More What is JUnit 5? (+Video Tutorial)
In this tutorial, you will learn what is Spring Cloud Vault, how to install and run HashiCorp’s Vault using three different methods: from HashiCorp website, using Homebrew, or as Docker container. What is Spring Cloud Vault? How do we store secrets safe in a distributed system? Secrets are sensitive information that you don’t want to expose…
Read More Installing and Running HashiCorp’s Vault for Spring Cloud
Environment variables are useful for configuring the behavior of an application without modifying its code. They are often used to store sensitive information such as passwords, API keys, or database credentials. However, passing environment variables to a Docker container can be tricky, especially if you want to keep them secure and avoid exposing them in…
Read More Passing Environment Variables to Docker Container
In this tutorial, you will learn how to return a custom error message if the conditions of the Spring Method Security are not met. To learn more about method-level security annotations read: Spring Method-Level Security with @PreAuthorize, Spring Security @Secured: Method-Level Protection, @PostAuthorize Security Annotation Example. Controller class with Spring Method Security Annotation Let’s assume…
Read More Spring Method Security: Customize Error Message
In this tutorial, I’m going to walk you through how to execute a JUnit 5 test case from a command-line terminal without the use of Maven or Gradle. If you’re just starting out with Java or JUnit, you’re in the right place. I’ll explain everything in detail, step-by-step, so you can follow along even if…
Read More Run JUnit 5 Tests from Command Line without Maven or Gradle
Project Reactor is an open-source reactive library for building reactive applications in Java. It is part of the broader Reactive Streams initiative and provides an implementation of the Reactive Streams specification. Developed by Pivotal Software, Project Reactor has gained widespread adoption in the Java ecosystem due to its powerful abstractions and ease of use. At…
Read More Introduction to Project Reactor in Java
In the ever-evolving world of software development, responsiveness and efficiency are paramount. Reactive Programming provides a powerful paradigm that allows you to build applications that are highly responsive, scalable, and resilient. In this tutorial, we will delve into the world of Reactive Programming in Java, exploring its key concepts and how it can benefit your…
Read More Introduction to Reactive Streams in Java
In this tutorial, you will learn about Spring Bean Scopes, an important part of the Spring Framework. You will learn what they are, how they work, and when to use them. By the end, you’ll have a clear understanding of Spring Bean Scopes, helping you build better Spring applications. Introduction to Spring Beans In the…
Read More A Guide to Spring Bean Scopes
Reactive Programming, a powerful paradigm in modern software development, revolutionizes the way we handle data and events. By embracing reactive principles, developers can build highly responsive and scalable applications. In this tutorial, we will explore the fundamentals of Reactive Programming, its benefits, common use cases, and delve into real-world examples to demonstrate its practical applications.…
Read More Introduction to Reactive Programming
Arrays and lists are fundamental data structures in Java that allow you to store collections of elements: Arrays: In Java, an array is a fixed-size, ordered collection of elements of the same type. It provides a contiguous block of memory to store the elements and allows direct access to each element using an index. Arrays…
Read More Convert an Array to a List in Java
In Java programming, converting an int to a String involves transforming a numeric value of type int into its string representation. The string representation allows the number to be treated as a sequence of characters rather than a numerical value. This conversion is particularly useful when you need to concatenate the int value with other…
Read More Convert int to String in Java
Java Regex, also known as Regular Expression, is a powerful tool used for manipulating and managing strings. It consists of a sequence of characters that form a pattern, which can be used to match and locate specific strings within a larger text. In Java, regular expression functionality is provided through the java.util.regex package, which includes…
Read More Java Regex – Regular Expression Examples