Publish and Receive Messages with Nats Java Client
1. Overview In this tutorial, we’ll use the Java Client for NATs to connect to a NATS Server and publish and receive messages. NATS offers three primary modes of message exchange. Publish/Subscribe...
View ArticleIntegration Testing with a Local DynamoDB Instance
1. Overview If we develop an application which uses Amazon’s DynamoDB, it can be tricky to develop integration tests without having a local instance. In this tutorial, we’ll explore multiple ways of...
View ArticleFind Sum and Average in a Java Array
1. Introduction In this quick tutorial, we’ll cover how we can calculate sum & average in an array using both Java standard loops and the Stream API. 2. Find Sum of Array Elements 2.1. Sum Using a...
View ArticleHandling Cookies and a Session in a Java Servlet
1. Overview In this tutorial, we’ll cover the handling of cookies and sessions in Java, using Servlets. Additionally, we’ll shortly describe what a cookie is, and explore some sample use cases for it....
View ArticleShutdown a Spring Boot Application
1. Overview Managing the lifecycle of Spring Boot Application is very important for a production-ready system. The Spring container handles the creation, initialization, and destruction of all the...
View ArticleCreating and Deploying Smart Contracts with Solidity
1. Overview The ability to run smart contracts is what has made the Ethereum blockchain so popular and disruptive. Before we explain what a smart contract is, let’s start with a definition of...
View ArticleIntroduction to Atlassian Fugue
1. Introduction Fugue is a Java library by Atlassian; it’s a collection of utilities supporting Functional Programming. In this write-up, we’ll focus on and explore the most important Fugue’s APIs. 2....
View ArticleJava Weekly, Issue 223
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 ArticleNew Password Storage In Spring Security 5
1. Introduction With the latest Spring Security release, a lot has changed. One of those changes is how we can handle password encoding in our applications. In this tutorial, we’re going to explore...
View ArticleIntroduction to EasyMock
1. Introduction In the past, we’ve talked extensively about JMockit and Mockito. In this tutorial, we’ll give an introduction to another mocking tool – EasyMock. 2. Maven Dependencies Before we dive...
View ArticleFiltering Observables in RxJava
1. Introduction Following the Introduction to RxJava, we’re going to look at the filtering operators. In particular, we’re going to focus on filtering, skipping, time-filtering, and some more advanced...
View ArticleObjects in Kotlin
1. Introduction Kotlin borrowed many ideas from other languages; one of such constructs is the object. In this quick article, we’ll see what objects are and how can be used. 2. Objects in Kotlin In...
View ArticleHamcrest Custom Matchers
1. Introduction As well as built-in matchers, Hamcrest also provides support for creating custom matchers. In this tutorial, we’ll take a closer look at how to create and use them. To get a sneak peek...
View ArticleClass Loaders in Java
1. Introduction to Class Loaders Class loaders are responsible for loading Java classes during runtime dynamically to the JVM (Java Virtual Machine). Also, they are part of the JRE (Java Runtime...
View ArticleSpring Security with Thymeleaf
1. Overview In this quick tutorial, we’ll focus on Spring Security with Thymeleaf. We’re going to create a Spring Boot application where we’ll demonstrate the usage of security dialect. Our choice for...
View ArticleIntroduction to JavaFx
1. Introduction JavaFX is a library for building rich client applications with Java. It provides an API for designing GUI applications that run on almost every device with Java support. In this...
View ArticleShow Hibernate/JPA SQL Statements from Spring Boot
1. Overview Spring JDBC and JPA provide abstractions over native JDBC APIs allowing developers to do away with native SQL queries. However, often we need to see those auto-generated SQL queries and...
View ArticleInheritance and Composition (Is-a vs Has-a relationship) in Java
1. Overview Inheritance and composition — along with abstraction, encapsulation, and polymorphism — are cornerstones of object-oriented programming (OOP). In this tutorial, we’ll cover the basics of...
View ArticleSpring Boot Gradle Plugin
1. Overview The Spring Boot Gradle plugin helps us manage Spring Boot dependencies, as well as package and run our application when using Gradle as a build tool. In this tutorial, we’ll discuss how we...
View ArticleReading from a File in Kotlin
1. Overview In this quick tutorial, we’ll learn about the various ways of reading a file in Kotlin. We’ll cover both use cases of reading the entire file as a String, as well as reading it into a list...
View Article