Find All Pairs of Numbers in an Array That Add Up to a Given Sum
1. Overview In this quick tutorial, we’ll show how to implement an algorithm for finding all pairs of numbers in an array whose sum equals a given number. We’ll focus on two approaches to the problem....
View ArticleTesting Netty with EmbeddedChannel
1. Introduction In this article, we’ll see how to use EmbeddedChannel to test the functionality of our inbound and outbound channel handlers. Netty is a very versatile framework for writing...
View ArticleWrapper Classes in Java
1. Overview As the name suggests, wrapper classes are objects encapsulating primitive Java types. Each Java primitive has a corresponding wrapper: boolean, byte, short, char, int, long, float, double...
View ArticleJava KeyStore API
1. Overview In this tutorial, we’re looking at managing cryptographic keys and certificates in Java using the KeyStore API. 2. Keystores If we need to manage keys and certificates in Java, we need a...
View ArticleIntroduction to SSL in Java
1. Overview In this tutorial, we’ll introduce SSL and explore how we can use it in Java using JSSE (Java Secure Socket Extension) API. 2. Introduction Simply put, the Secured Socket Layer (SSL)...
View ArticleSpring WebFlux Filters
1. Overview The use of filters is widespread in web applications since they give us a way to modify a request or response without changing our endpoints. In this quick tutorial, we’ll describe...
View ArticleIntro to Apache OpenNLP
1. Overview Apache OpenNLP is an open source Natural Language Processing Java library. It features an API for use cases like Named Entity Recognition, Sentence Detection, POS tagging and Tokenization....
View ArticleWorking with Boolean in Thymeleaf
1. Introduction In this quick tutorial, we’re going to look at how to work with boolean values in Thymeleaf. Before we dive into the details, Thymeleaf basics can be found in this writeup. 2....
View ArticleSpring MVC @PathVariable with a dot (.) gets truncated
1. Overview In this short tutorial, we’ll discuss a common problem when working with Spring MVC – when using a Spring @PathVariable with a @RequestMapping to map the end of a request URI that contains...
View ArticleJava Weekly, Issue 226
Here we go… 1. Spring and Java >> Monitor and troubleshoot Java applications and services with Datadog Optimize performance with end-to-end tracing and out-of-the-box support for popular Java...
View ArticleJava Concurrency Utility with JCTools
1. Overview In this tutorial, we’ll introduce the JCTools (Java Concurrency Tools) library. Simply put, this provides a number of utility data structures suitable for working in a multi-threaded...
View ArticleA Quick Intro to the SpringBootServletInitializer
1. Overview In this tutorial, we’ll go through a quick introduction of the SpringBootServletInitializer. This is an extension of WebApplicationInitializer which runs a SpringApplication from a...
View ArticleThe State of Java in 2018
I’ve been running the yearly “State of Java” survey for the last couple of weeks. It’s the 5th year of the survey and naturally the largest one yet, with 5160 developers taking the time to go through...
View ArticleReactive Flow with MongoDB, Kotlin, and Spring WebFlux
1. Overview In this tutorial, we’ll write a simple application showcasing a fully reactive flow using Spring Data Reactive MongoDB and Spring SSeEmitter. On one side, we’ll apply Spring Data Reactive...
View ArticleHow to Find an Element in a List with Java
1. Overview Finding an element in a list is a very common task we come across as developers. In this quick tutorial, we’ll cover different ways we can do this with Java. 2. Setup Let’s start by...
View ArticleIntroduction to Primefaces
1. Introduction Primefaces is an open source UI component suite for Java Server Faces (JSF) applications. In this tutorial, we’ll give an introduction to Primefaces, and demonstrate how to configure...
View ArticleIteration in Thymeleaf
1. Overview Thymeleaf is a versatile Java template engine for processing XML, XHTML and HTML5 documents. In this quick tutorial, we’ll take a look at how we can perform iteration with Thymeleaf, along...
View ArticleSending Emails with Java
1. Overview In this quick tutorial, we’re going to look at sending email with and without attachments – using the core Java mail library. 2. Project Setup and Dependency For this article, we’ll be...
View ArticleHow to Define a Spring Boot Filter?
1. Overview In this quick tutorial, we’ll explore how to define custom filters and specify their invocation order with the help of Spring Boot. 2. Defining Filters and the Invocation Order Let’s...
View ArticleService Locator Pattern
1. Introduction In this tutorial, we’re going to learn about the Service Locator design pattern in Java. We’ll describe the concept, implement an example and highlight the pros and cons of its use. 2....
View Article