Using Guava CountingOutputStream
1. Overview In this tutorial, we’re going to look at the CountingOutputStream class and how to use it. The class can be found in popular libraries like Apache Commons or Google Guava. We’re going...
View ArticleDisplaying Money Amounts in Words
1. Overview In this tutorial, we’ll see how we can convert a monetary amount into words-representation in Java. We’ll also see how a custom implementation could look like, via an external library –...
View ArticleGetting Started with Java and Zookeeper
1. Overview Apache ZooKeeper is a distributed coordination service which eases the development of distributed applications. It’s used by projects like Apache Hadoop, HBase and others for different use...
View ArticleJava Weekly, Issue 221
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 ArticleA Guide to Flips for Spring
1. Overview In this tutorial, we’ll have a look at Flips, a library that implements feature flags in the form of powerful annotations for Spring Core, Spring MVC, and Spring Boot applications. Feature...
View ArticleHamcrest Bean Matchers
1. Overview Hamcrest is a library that provides methods, called matchers, to help developers write simpler unit tests. There are plenty of matchers, you can get started by reading about some of them...
View ArticleA Quick Guide to the Spring @Lazy Annotation
1. Overview By default, Spring creates all singleton beans eagerly at the startup/bootstrapping of the application context. The reason behind this is simple: to avoid and detect all possible errors...
View ArticleWorking with Kotlin and JPA
1. Introduction One of Kotlin’s characteristics is the interoperability with Java libraries, and JPA is certainly one of these. In this tutorial, we’ll explore how to use Kotlin Data Classes as JPA...
View ArticleBuild an MVC Web Application with Grails
1. Overview In this tutorial, we’ll learn how to create a simple web application using Grails. Grails (more precisely it’s latest major version) is a framework built on top of the Spring Boot project...
View ArticleIntroduction to RxRelay for RxJava
1. Introduction The popularity of RxJava has led to the creation of multiple third-party libraries that extend its functionality. Many of those libraries were an answer to typical problems that...
View ArticleA Simple Tagging Implementation with MongoDB
1. Overview In this tutorial, we’ll take a look at a simple tagging implementation using Java and MongoDB. For those unfamiliar with the concept, a tag is a keyword used as a “label” to group...
View ArticleHamcrest Object Matchers
1. Overview Hamcrest provides static matchers for making unit test assertions simpler and more legible. You can get started exploring some of the available matchers here. In this quick tutorial, we’ll...
View ArticleIntroduction to CheckStyle
1. Overview Checkstyle is an open source tool that checks code against a configurable set of rules. In this tutorial, we’re going to look at how to integrate Checkstyle into a Java project via Maven...
View ArticleThe “final” Keyword in Java
1. Overview While inheritance enables us to reuse existing code, sometimes we do need to set limitations on extensibility for various reasons; the final keyword allows us to do exactly that. In this...
View ArticleHeaders, Cookies and Parameters with REST-assured
1. Overview In this quick tutorial, we’ll explore some REST-assured advanced scenarios. We explored REST-assured before in the tutorial a Guide to REST-assured. To continue, we’ll cover examples that...
View ArticleJSON Schema Validation with REST-assured
1. Overview The REST-assured library provides support for testing REST APIs, usually in JSON format. From time to time it may be desirable, without analyzing the response in detail, to know first-off...
View ArticleHandling Daylight Savings Time in Java
1. Overview Daylight Saving Time, or DST, is a practice of advancing clocks during summer months in order to leverage an additional hour of the natural light (saving heating power, illumination power,...
View ArticleCombining Observables in RxJava
1. Introduction In this quick tutorial, we’ll discuss different ways of combining Observables in RxJava. If you’re new to RxJava, definitely check out this intro tutorial first. Now, let’s jump right...
View ArticleThe Spring @Controller and @RestController Annotations
1. Overview In this quick tutorial, we’ll discuss the difference between @Controller and @RestController annotations in Spring MVC. The first annotation is used for traditional Spring controllers and...
View ArticleCommand-Line Arguments in Spring Boot
1. Overview In this quick tutorial, we’ll discuss how to pass command-line arguments to a Spring Boot application. We can use command-line arguments to configure our application, override application...
View Article