Silencing the Output of a Bash Command
1. Overview In this quick tutorial, we’ll focus on how to silence the output of a Bash command. 2. Prerequisites Before silencing the output, we first need to understand how Bash handles output when...
View ArticleGuide to JUnit 4 Rules
1. Overview In this tutorial, we’re going to take a look at the Rules feature provided by the JUnit 4 library. We’ll begin by introducing the JUnit Rules Model before walking through the most important...
View ArticleJava Weekly, Issue 295
Here we go… 1. Spring and Java >> Securing Services with Spring Cloud Gateway [spring.io] As the series continues, we see how to secure services using the Token Relay pattern with OAuth2....
View ArticleJHipster Authentication with an External Service
1. Introduction By default, JHipster applications use a local data store to hold usernames and passwords. In many real-world scenarios, however, it might be desirable to use an existing external...
View ArticleJPA Query Parameters Usage
1. Introduction Building queries using JPA is not difficult; however, we sometimes forget simple things that make a huge difference. One of these things is JPA query parameters, and this is what we are...
View Article@Timed Annotation Using Metrics and AspectJ
1. Introduction Monitoring is very helpful for finding bugs and optimizing performance. We could manually instrument our code to add timers and logging, but this would lead to a lot of distracting...
View ArticleRun a Java main Method Using Gradle
1. Introduction In this tutorial, we’ll explore the different methods of executing a Java main method using Gradle. 2. Java main Method There are several ways in which we can run a Java main method...
View ArticleIsomorphic Application with React and Nashorn
1. Overview In this tutorial, we’ll understand what exactly is an isomorphic app. We’ll also discuss Nashorn, the JavaScript engine bundled with Java. Furthermore, we’ll explore how we can use Nashorn...
View ArticleCounting Words in a String
1. Overview In this tutorial, we are going to go over different ways of counting words in a given string using Java. 2. Using StringTokenizer A simple way to count words in a string in Java is to use...
View ArticleLogging HTTP Requests with Spring Boot Actuator HTTP Tracing
1. Introduction When we work with microservices or web services in general, it’s quite useful to know how our users interact with our services. This can be achieved by tracing all the requests that hit...
View ArticleAn Overview of QuickSort Algorithm
1. Introduction In this article, we’re going to look at the quicksort algorithm and understand how it works. Quicksort is a divide-and-conquer algorithm. This means each iteration works by dividing the...
View ArticleAn Intro to the Java Debug Interface (JDI)
1. Overview We may wonder how widely recognized IDEs like IntelliJ IDEA and Eclipse implement debugging features. These tools rely heavily on the Java Platform Debugger Architecture (JPDA). In this...
View ArticleA Guide to System.exit()
1. Overview In this tutorial, we’ll have a look at what System.exit means in Java. We’ll see its purposes, where to use and how to use it. We’ll also see what’s the difference in invoking it with...
View ArticleChecked and Unchecked Exceptions in Java
1. Overview Java exceptions fall into two main categories: checked exceptions and unchecked exceptions. In this article, we’ll provide some code samples on how to use them. 2. Checked Exceptions In...
View ArticleMachine Learning with Spark MLlib
1. Overview In this tutorial, we’ll understand how to leverage Apache Spark MLlib to develop machine learning products. We’ll develop a simple machine learning product with Spark MLlib to demonstrate...
View ArticleFreeMarker Common Operations
1. Introduction FreeMarker is a template engine, written in Java, and maintained by the Apache Foundation. We can use the FreeMarker Template Language, also known as FTL, to generate many text-based...
View ArticleAppend Lines to a File in Linux
1. Introduction In this tutorial, we’re going to explore several ways to append one or more lines to a file in Linux using Bash commands. First, we’ll examine the most common commands like echo,...
View ArticleMesos vs. Kubernetes
1. Overview In this tutorial, we'll understand the basic need for a container orchestration system. We'll evaluate the desired characteristic of such a system. From that, we'll try to compare two of...
View ArticleUsing a Mutex Object in Java
1. Overview In this tutorial, we'll see different ways to implement a mutex in Java. 2. Mutex In a multithreaded application, two or more threads may need to access a shared resource at the same time,...
View ArticleGenerating SSH Keys in Linux
1. Overview In this tutorial, we'll cover the basics of SSH keys and how to generate an SSH key pair in Linux. 2. Secure Shell (SSH) Secure Shell (SSH) is a secure remote login protocol that leverages...
View Article