OData Protocol Guide
1. Introduction In this tutorial, we’ll explore OData, a standard protocol that allows easy access to data sets using a RESTFul API. 2. What is OData? OData is an OASIS and ISO/IEC Standard for...
View ArticleDerived Query Methods in Spring Data JPA Repositories
1. Introduction For simple queries, it’s easy to derive what the query should be just by looking at the corresponding method name in our code. In this tutorial, we’ll explore how Spring Data JPA...
View ArticleHow to Find an Exception’s Root Cause in Java
1. Introduction It’s pretty common in Java to work with nested exceptions as they can help us track the source of an error. When we deal with these kinds of exceptions, sometimes we may want to know...
View ArticleTemplate Engines in Groovy
1. Overview In this introductory tutorial, we’ll explore the concept of template engines in Groovy. In Groovy, we can use GStrings to generate dynamic text easily. However, the template engines provide...
View ArticleConverting Between Stream and Array in Java
1. Introduction It’s common to need to convert various dynamic data structures into arrays. In this tutorial, we’ll demonstrate how to convert a Stream to an array and vice versa in Java. 2. Converting...
View ArticleJava Weekly, Issue 281
Here we go… 1. Spring and Java >> Test-Driven Development: Really, It’s a Design Technique [infoq.com] A step-by-step walkthrough of TDD using a simple Java example. >> Property-based...
View ArticleString Initialization in Java
1. Introduction Java String is one of the most important classes and we’ve already covered a lot of its aspects in our String-related series of tutorials. In this tutorial, we’ll focus on String...
View ArticleIntroduction to RxKotlin
1. Overview In this tutorial, we’re going to review the use of Reactive Extensions (Rx) in idiomatic Kotlin using the RxKotlin library. RxKotlin is not an implementation of Reactive Extensions, per se....
View ArticleDifference Between a Java Keystore and a Truststore
1. Overview In this article, we’ll provide an overview of the differences between a Java keystore and a Java truststore. 2. Concepts In most cases, we use a keystore and a truststore when our...
View ArticleString API Updates in Java 12
1. Introduction Java 12 added a couple of useful APIs to the String class. In this tutorial, we will explore these new APIs with examples. 2. indent() The indent() method adjusts the indentation of...
View ArticleRemoving Stopwords from a String in Java
1. Overview In this tutorial, we’ll discuss different ways to remove stopwords from a String in Java. This is a useful operation in cases where we want to remove unwanted or disallowed words from a...
View ArticleLIKE Queries in Spring JPA Repositories
1. Introduction In this quick tutorial, we’re going to cover various ways of creating LIKE queries in Spring JPA Repositories. We’ll start by looking at the various keywords we can use while creating...
View ArticlePersisting Enums in JPA
1. Introduction In JPA version 2.0 and below, there’s no convenient way to map Enum values to a database column. Each option has its limitations and drawbacks. These issues can be avoided by using JPA...
View ArticleThe Difference Between CDI and EJB Singleton
1. Overview In this tutorial, we’ll take a closer look at two types of singletons available in Java EE. We’ll explain and demonstrate the differences and see the usages suitable for each one. First,...
View ArticleHow to Delay Code Execution in Java
1. Introduction It is relatively common for Java programs to add a delay or pause in their operation. This can be useful for task pacing or to pause execution until another task completes. This...
View ArticleNegate a Predicate Method Reference with Java 11
1. Overview In this short tutorial, we’ll see how to negate a Predicate method reference using Java 11. We’ll start with the limitations encountered in order to achieve this before Java 11. Then we’ll...
View ArticleGuide to Java FileChannel
1. Overview In this quick tutorial, we’ll look at the FileChannel class provided in the Java NIO library. We’ll discuss how to read and write data using FileChannel and ByteBuffer. We’ll also explore...
View ArticleJPA/Hibernate Projections
1. Overview In this tutorial, we’ll learn how to project entity properties using JPA and Hibernate. 2. The Entity First, let’s look at the entity we will be using throughout this article: @Entity...
View ArticleSpring Boot Embedded Tomcat Logs
1. Introduction Spring Boot comes with an embedded Tomcat server, which is super-handy. However, we can’t see Tomcat’s logs by default. In this tutorial, we’ll learn how to configure Spring Boot to...
View ArticleDesign Strategies for Decoupling Java Modules
1. Overview The Java Platform Module System (JPMS) provides stronger encapsulation, more reliability and better separation of concerns. But all these handy features come at a price. Since modularized...
View Article