Reactive Streams API with Ratpack
1. Introduction Ratpack is a framework built on top of the Netty engine, which allows us to quickly build HTTP applications. We’ve already covered its basic usage in previous articles. This time, we’ll...
View ArticleEnvironment Variable Prefixes in Spring Boot 2.5
1. Overview This tutorial will discuss a feature added in Spring Boot 2.5 that enables the possibility to specify a prefix for system environment variables. This way, we can run multiple different...
View ArticleConvert a Byte Array to a Numeric Representation in Java
1. Overview In this tutorial, we'll explore different approaches to convert a byte array to a numeric value (int, long, float, double) and vice versa. The byte is the basic unit of information in...
View ArticleRemove an Entry from a Java HashMap
1. Overview In this article, we'll discuss different ways to remove an entry from a Java HashMap. 2. Introduction HashMap stores entries in (Key, Value) pairs with unique keys. Thus, one idea would be...
View ArticleFormat Swagger Text Descriptions
1. Introduction The OpenAPI specification (formerly Swagger specification) standardizes REST API documentation language and is platform agnostic. We can create OpenAPI documents in YAML or JSON...
View ArticleRemove Accents and Diacritics From a String in Java
1. Overview Many alphabets contain accent and diacritical marks. To search or index data reliably, we might want to convert a string with diacritics to a string containing only ASCII characters....
View ArticleParallel Test Execution for JUnit 5
1. Introduction In this article, we'll cover how to execute parallel unit tests using JUnit 5. First, we'll cover basic configuration and minimal requirements to start using this feature. Next, we'll...
View ArticleIntroduction to the Evrete Rule Engine
1. Introduction This article provides a first hands-on overview of Evrete — a new open-source Java rule engine. Historically, Evrete has been developed as a lightweight alternative to the Drools Rule...
View ArticlePattern Matching for Switch
1. Overview The Java SE 17 release introduces pattern matching for switch expressions and statements (JEP 406) as a preview feature. Pattern matching provides us more flexibility when defining...
View ArticleJava Weekly, Issue 408
1. Spring and Java >> Sip of Java – Serialization Filters [inside.java] Having more control on deserializing incoming data – solving security and obscurity issues of Java serialization in Java...
View ArticleSaving Date Values in Spring Data Cassandra
1. Overview Apache Cassandra is a scalable NoSQL database. It provides continuous availability with no single point of failure. In addition, Cassandra is able to handle large amounts of data with...
View ArticleDockerfile Strategies for Git
1. Introduction .Git is the leading version control system for software development. The Dockerfile, on the other hand, contains all the commands to automatically build an image of our application....
View ArticleGetting a Character by Index From a String in Java
1. Introduction The charAt() method of the String class returns the character at a given position of a String. This is a useful method that has been available from version 1.0 of the Java language. In...
View ArticleStates of a Docker Container
1. Overview A Docker container is an instance of a Docker image that runs some process inside it. As the state of this process changes, the behavior of the container is also affected. Thus, a container...
View ArticleUsing Test Containers With Spring Data Cassandra
1. Overview Apache Cassandra is an open-source distributed NoSQL database. It was designed to handle large amounts of data with fast read-write performance and with no single point of failure. In this...
View ArticleJava Map – keySet() vs. entrySet() vs. values() Methods
1. Overview In this tutorial, we'll discuss the three methods keySet(), entrySet() and values() of the Map interface in Java. These methods are used to retrieve a set of keys, a set of key-value...
View ArticleConvert an Object to a Byte Array in Java
1. Overview In this short tutorial, we'll learn how to convert a Java object to a byte array and vice versa. 2. Use Plain Java For example, suppose we have a User class: public class User implements...
View ArticleSwitching Between Frames Using Selenium WebDriver in Java
1. Introduction Managing frames and iframes is a crucial skill for test automation engineers. Selenium WebDriver allows us to work with both frames and iframes in the same way. In this tutorial, we’ll...
View ArticleWhy Is sun.misc.Unsafe.park Actually Unsafe?
1. Overview Java provides certain APIs for internal use and discourages unnecessary use in other cases. The JVM developers gave the packages and classes names such as Unsafe, which should warn...
View ArticleHashSet toArray() Method in Java
1. Introduction HashSet is one of the common data structures that we can utilize in Java Collеctions. In this tutorial, we’ll dive into the toArray() method of the HashSet class, illustrating how to...
View Article