Guide to JMapper
1. Overview In this tutorial, we’ll explore JMapper – a fast and easy to use mapping framework. We’ll discuss different ways to configure JMapper, how to perform custom conversions, as well as...
View ArticleTest a REST API with curl
1. Overview This tutorial gives a brief overview of testing a REST API using curl. curl is a command-line tool for transferring data and supports about 22 protocols including HTTP. This combination...
View ArticleBuild a Jar with Maven and Ignore the Test Results
1. Introduction This quick tutorial shows how to build a jar with Maven while ignoring the test results. By default, Maven runs unit tests automatically while building the project. However, there are...
View ArticleSpring Webflux and CORS
1. Overview In a previous post, we learned about Cross-Origin Resource Sharing (CORS) specification and how to use it within Spring. In this quick tutorial, we’ll set up a similar CORS configuration...
View ArticleSpring Webflux with Kotlin
1. Overview In this tutorial, we demonstrate how to use Spring WebFlux module using Kotlin programming language. We illustrate how to use the annotation-based and the lambda-based style approaches in...
View ArticleGuide to Apache Avro
1. Overview Data serialization is a technique of converting data into binary or text format. There are multiple systems available for this purpose. Apache Avro is one of those data serialization...
View ArticleInitializing HashSet at the Time of Construction
1. Overview In this quick tutorial, we’ll introduce various methods of initializing the HashSet with values, at the time of its construction. If you’re instead looking to explore the features of...
View ArticleHow to Trigger and Stop a Scheduled Spring Batch Job
1. Overview In this tutorial, we’ll investigate and compare different ways to trigger and stop a scheduled Spring Batch job for any required business cases. If you need introductions about Spring...
View ArticleA Guide to Message Driven Beans in EJB
1. Introduction Simply put, an Enterprise JavaBean (EJB) is a JEE component that runs on an application server. In this tutorial, we’ll discuss Message Driven Beans (MDB), responsible for handling...
View ArticleA Guide to Eclipse JNoSQL
1. Overview Eclipse JNoSQL is a set of APIs and implementations that simplify the interaction of Java applications with NoSQL databases. In this article, we’ll learn how to set up and configure JNoSQL...
View ArticleGetting a File’s Mime Type in Java
1. Overview In this tutorial, we’ll take a look at various strategies for getting MIME types of a file. We’ll look at ways to extend the MIME types available to the strategies, wherever applicable....
View ArticleHow to Convert List to Map in Java
1. Overview Converting List to Map is a common task. In this tutorial, we’ll cover several ways to do this. We’ll assume that each element of the List has an identifier which will be used as a key in...
View ArticleQuery Entities by Dates and Times with Spring Data JPA
1. Introduction In this quick tutorial, we’ll see how to query entities by dates with Spring Data JPA. We’ll first refresh our memory about how to map dates and times with JPA. Then, we’ll create an...
View ArticleGuide to Java Instrumentation
1. Introduction In this tutorial, we’re going to talk about Java Instrumentation API. It provides the ability to add byte-code to existing compiled Java classes. We’ll also talk about java agents and...
View ArticleA Guide to SqlResultSetMapping
1. Introduction In this guide, we’ll take a look at SqlResultSetMapping, out of the Java Persistence API (JPA). The core functionality here involves mapping result sets from database SQL statements...
View ArticleMockito.mock() vs @Mock vs @MockBean
1. Overview In this quick tutorial, we’ll look at three different ways of creating mock objects and how they differ from each other – with Mockito and with the Spring mocking support. 2....
View ArticleOverriding System Time for Testing in Java
1. Overview In this quick tutorial, we’ll focus on different ways to override the system time for testing. Sometimes there’s a logic around the current date in our code. Maybe some function calls such...
View ArticleJava Weekly, Issue 239
Here we go… 1. Spring and Java >> Refining functional Spring [blog.frankel.ch] A quick writeup touching on a few nuances of writing handlers and routes in this exciting new functional approach...
View ArticleComparing Embedded Servlet Containers in Spring Boot
1. Introduction The rising popularity of cloud-native applications and micro-services generate an increased demand for embedded servlet containers. Spring Boot allows developers to easily build...
View ArticleSpring @Primary Annotation
1. Overview In this quick tutorial, we’ll discuss Spring’s @Primary annotation which was introduced with version 3.0 of the framework. Simply put, we use @Primary to give higher preference to a bean...
View Article