Squash the Last X Commits Using Git
1. Overview We may often hear the word “squash” when we talk about Git workflows. In this tutorial, we'll shortly introduce what Git squashing is. Then, we'll talk about when we need to squash commits....
View ArticleFormat a Milliseconds Duration to HH:MM:SS
1. Overview Duration is an amount of time expressed in terms of hours, minutes, seconds, milliseconds, and so on. We may wish to format a duration into some particular time pattern. We can achieve this...
View ArticleAccess Control Models
1. Introduction In this article, we’ll explore different access control models how to implement them in practice. 2. What’s an Access Control Model? A common requirement for applications, especially...
View ArticleJava Weekly, Issue 401
1. Spring and Java >> Saving Time with Structured Logging [reflectoring.io] Optimizing our logs for being queried – a practical guide on how to add structure to our log events. >> Soft...
View ArticleTest WebSocket APIs With Postman
1. Overview In this article, we'll create an application with WebSocket and test it using Postman. 2. Java WebSockets WebSocket is a bi-directional, full-duplex, persistent connection between a web...
View ArticleJavadoc: @version and @since
1. Overview Javadoc is a way to generate documentation in HTML format from Java source code. In this tutorial, we'll focus on the @version and @since tags in doc comments. 2. Usage Of @version And...
View ArticleUnderstanding Detached HEAD in Git
1. Overview It is not very uncommon to come across a mysterious state while working on git. However, one day it is most likely to see “detached HEAD”. In this tutorial, we'll discuss what is a detached...
View ArticleFind the IP Address of a Client Connected to a Server
1. Introduction In this quick tutorial, we're going to learn how to find the IP address of a client computer connected to a server. We'll create a simple client-server scenario to allow us to explore...
View ArticleConnecting to a Specific Schema in JDBC
1. Introduction In this article, we'll cover the basics of database schemas, why we need them, and how they are useful. After that, we'll focus on practical examples of setting schema in JDBC with...
View ArticleUnderstanding Maven’s “relativePath” Tag for a Parent POM
1. Overview In this tutorial, we'll learn about the Parent POM resolution of Maven. First, we'll discover the default behavior. Then, we'll discuss the possibilities to customize it. 2. Default Parent...
View ArticleEnabling Unlimited Strength Cryptography in Java
1. Overview In this tutorial, we'll learn why the Java Cryptography Extension (JCE) unlimited strength policy files are not always enabled by default. Additionally, we'll explain how to check the...
View ArticleJava Weekly, Issue 402
1. Spring and Java >> A Java 17 and Jakarta EE 9 baseline for Spring Framework 6 [spring.io] Moving the Java ecosystem forward – Spring is planning to use Java 17 as the minimum version for...
View ArticleGenerate a Java Class From JSON
1. Overview In some situations, we need to create Java classes, also called POJOs, using JSON files. This is possible without writing the whole class from scratch using a handy jsonschema2pojo library....
View ArticleGuide to mapMulti in Stream API
1. Overview In this tutorial, we'll review the method Stream::mapMulti introduced in Java 16. We'll write simple examples to illustrate how to use it. In particular, we'll see that this method is...
View ArticlePerformance of System.arraycopy() vs. Arrays.copyOf()
1. Introduction In this tutorial, we will look at the performance of two Java methods: System.arraycopy() and Arrays.copyOf(). First, we'll analyze their implementations. Second, we'll run some...
View ArticleUpload a File with WebClient
1. Overview Our applications often have to handle file uploads via an HTTP request. Since Spring 5, we can now make these requests reactive. The added support for Reactive Programming allows us to work...
View ArticlePriority of a Thread in Java
1. Introduction In this tutorial, we'll discuss how the Java thread scheduler executes threads on a priority basis. Additionally, we'll cover the types of thread priorities in Java. 2. Types of...
View ArticleJoinpoint vs. ProceedingJoinPoint in AspectJ
1. Introduction In this short tutorial, we'll learn about the differences between JoinPoint and ProceedingJoinPoint interfaces in AspectJ. We'll cover it with a brief explanation and code examples. 2....
View ArticleJava Weekly, Issue 403
1. Spring and Java >> The Arrival of Java 17 [inside.java] Java 17, a new LTS version, is now available – sealed classes, pattern matching, enhanced random numbers, vectorization, foreign memory...
View ArticleDifferent Log4j2 Configurations per Spring Profile
1. Overview In our previous tutorials, Spring Profiles and Logging in Spring Boot, we showed how to activate different profiles and use Log4j2 in Spring. In this short tutorial, we'll learn how to use...
View Article