Self-Hosted Monitoring For Spring Boot Applications
1. Introduction One of the many great features of Spring Boot is the set of built-in actuators. These actuators provide an easy way to monitor and control just about every aspect of a Spring Boot...
View ArticleGraceful Shutdown of a Spring Boot Application
1. Overview On shutdown, by default, Spring's TaskExecutor simply interrupts all running tasks, but it may be nice to instead have it wait for all running tasks to be complete. This gives a chance for...
View ArticleLinux Commands – Remove All Text After X
1. Overview There are various occasions when we might want to remove the text after a specific character or set of characters. For example, one typical scenario is when we want to remove the extension...
View ArticleParsing an XML File Using SAX Parser
1. Overview SAX, also known as the Simple API for XML, is used for parsing XML documents. In this tutorial, we'll learn what SAX is and why, when and how it should be used. 2. SAX: The Simple API for...
View ArticleUsing JaVers for Data Model Auditing in Spring Data
1. Overview In this tutorial, we’ll see how to set up and use JaVers in a simple Spring Boot application to track changes of entities. 2. JaVers When dealing with mutable data we usually have only the...
View ArticleGrouping Javax Validation Constraints
1. Introduction In our Java Bean Validation Basics tutorial, we saw the usage of various built-in javax.validation constraints. In this tutorial, we'll see how to group javax.validation constraints. 2....
View ArticleAuthentication with HttpUrlConnection
1. Overview In this tutorial, we're going to explore how to authenticate HTTP requests using the HttpUrlConnection class. 2. HTTP Authentication In web applications, servers may require clients to...
View ArticleHow to Change the Java Version in an IntelliJ Project
1. Overview In this tutorial, we'll look at how to change the JDK version in IntelliJ projects. This will work on both Community and Ultimate Editions of IntelliJ. 2. Project Structure Settings...
View ArticleThreading Models in Java
1. Introduction Often in our applications, we need to be able to do multiple things at the same time. We can achieve this in several ways, but key amongst them is to implement multitasking in some...
View ArticleIgnoring Unmapped Properties with MapStruct
1. Overview In Java applications, we may wish to copy values from one type of Java bean to another. To avoid long, error-prone code, we can use a bean mapper such as MapStruct. While mapping identical...
View ArticleMocking a WebClient in Spring
1. Overview These days, we expect to call REST APIs in most of our services. Spring provides a few options for building a REST client, and WebClient is recommended. In this quick tutorial, we will look...
View ArticleFlogger Fluent Logging
1. Overview In this tutorial, we're going to talk about the Flogger framework, a fluent logging API for Java designed by Google. 2. Why use Flogger? With all the logging frameworks that are currently...
View ArticleSystem.out.println vs Loggers
1. Why Loggers? While writing a program or developing an enterprise production application, using System.out.println seems to be the simplest and easiest option. There are no extra libraries to be...
View ArticleMethods in Java
1. Introduction In Java, methods are where we define the business logic of an application. They define the interactions among the data enclosed in an object. In this tutorial, we'll go through the...
View ArticleSpring Security – Attacking OAuth
1. Introduction OAuth is the industry standard framework for delegated authorization. A lot of thought and care has gone into creating the various flows that make up the standard. Even then, it's not...
View ArticleJava Weekly, Issue 301
1. Spring and Java >> How to deploy war files to Spring Boot Embedded Tomcat [vojtechruzicka.com] A couple of solutions — one for Spring Boot 2.x and one for 1.x. >> GraphQL server in Java:...
View ArticleJava FileWriter
1. Overview In this tutorial, we'll learn and understand the FileWriter class present in the java.io package. 2. FileWriter FileWriter is a specialized OutputStreamWriter for writing character files....
View ArticleExcluding URLs for a Filter in a Spring Web Application
1. Overview Most web applications have a use-case of performing operations like request logging, validation, or authentication. And, what's more, such tasks are usually shared across a set of HTTP...
View ArticleIntegrating Spring with AWS Kinesis
1. Introduction Kinesis is a tool for collecting, processing, and analyzing data streams in real-time, developed at Amazon. One of its main advantages is that it helps with the development of...
View ArticleCreating Symbolic and Hard Links
1. Overview On a Linux machine, we can create links to an existing file. A link in Unix can be thought of as a pointer or a reference to a file. In other words, they're more of a shortcut to access a...
View Article