Processing JSON with Kotlin and Klaxson
1. Overview Klaxon is one of the open source libraries that we can use to parse JSON in Kotlin. In this tutorial, we’re going to look at its features. 2. Maven Dependency First, we’ll need to add the...
View ArticleGuide to the this Java Keyword
1. Introduction In this tutorial, we’ll take a look at the this Java keyword. In Java, this keyword is a reference to the current object whose method is being called. Let’s explore how and when we can...
View ArticleGuide to the super Java Keyword
1. Introduction In this quick tutorial, we’ll take a look at the super Java keyword. Simply put, we can use the super keyword to access the parent class. Let’s explore the applications of the core...
View ArticleReturning a JSON Response from a Servlet
1. Introduction In this quick tutorial, we’ll create a small web application and explore how to return a JSON response from a Servlet. 2. Maven For our web application, we’ll include javax.servlet-api...
View ArticleSpring Data Reactive Repositories with MongoDB
1. Introduction In this tutorial, we’re going to see how to configure and implement database operations using Reactive Programming through Spring Data Reactive Repositories with MongoDB. We’ll go over...
View ArticleVisitor Design Pattern in Java
1. Overview In this tutorial, we’ll introduce one of the behavioral GoF design patterns – the Visitor. First, we’ll explain its purpose and the problem it tries to solve. Next, we’ll have a look at...
View ArticleThe Thread.join() Method in Java
1. Overview In this tutorial, we’ll discuss the different join() methods in the Thread class. We’ll go into the details of these methods and some example code. Like the wait() and notify() methods,...
View ArticleMethod Parameter Reflection in Java
1. Overview Method Parameter Reflection support was added in Java 8. Simply put, it provides support for getting the names of parameters at runtime. In this quick tutorial, we’ll take a look at how to...
View ArticlePerformance of Java Mapping Frameworks
1. Introduction Creating large Java applications composed of multiple layers require using multiple models such as persistence model, domain model or so-called DTOs. Using multiple models for...
View ArticleSpring – Injecting Collections
1. Introduction In this tutorial, we’re going to show how to inject Java collections using the Spring framework. Simply put, we’ll demonstrate examples with the List, Map, Set collection interfaces....
View ArticleDifference Between JVM, JRE, and JDK
1. Overview In this article, we’ll discuss differences between JVM, JRE, and JDK by considering their components and uses. 2. JVM Java Virtual Machine (JVM) is an implementation of a virtual machine...
View ArticleMockito ArgumentMatchers
1. Overview This tutorial shows how to use the ArgumentMatcher and how it differs from the ArgumentCaptor. For an introduction to the Mockito framework, please refer to this article. 2. Maven...
View ArticleSpring Core Annotations
1. Overview We can leverage the capabilities of Spring DI engine using the annotations in the org.springframework.beans.factory.annotation and org.springframework.context.annotation packages. We often...
View ArticleJava 9 java.lang.Module API
1. Introduction Following A Guide to Java 9 Modularity, in this article, we’re going to explore the java.lang.Module API that was introduced alongside the Java Platform Module System. This API...
View ArticleConfigure a RestTemplate with RestTemplateBuilder
1. Introduction In this quick tutorial, we’re going to look at how to configure a Spring RestTemplate bean. Let’s start by discussing the three main configuration types: using the default...
View ArticleJUnit5 Programmatic Extension Registration with @RegisterExtension
1. Overview JUnit 5 provides multiple methods for registering extensions. For an overview of some of these methods, refer to our Guide to JUnit 5 Extensions. In this quick tutorial, we’ll focus on...
View ArticleJava Weekly, Issue 232
Here we go… 1. Spring and Java >> Truth First, or Why You Should Mostly Implement Database First Designs [blog.jooq.org] Some solid points to consider when thinking about where the source of...
View ArticleSpring Security OAuth Guides
OAuth2 Basics >> Spring REST API + OAuth2 + AngularJS >> Using JWT with Spring Security OAuth >> Testing an OAuth Secured API with Spring MVC Advanced Scenarios with OAuth2 >>...
View ArticleREST Query Language Over Multiple Tables with Querydsl Web Support
1. Overview In this tutorial, we’ll continue with the second part of Spring Data Querydsl Web Support. Here, we’ll focus on associated entities and how to create queries over HTTP. Following the same...
View ArticleJagged Arrays In Java
1. Overview A jagged array in Java is a multi-dimensional array comprising arrays of varying sizes as its elements. It’s also referred to as “an array of arrays” or “ragged array”. In this quick...
View Article