Migrating from Java to Kotlin
1. Overview In this tutorial, we’re going to take a look at how we can migrate from Java to Kotlin. While we’ll be looking at many basic examples, this article is not an introduction to Kotlin. For a...
View ArticleJava Weekly, Issue 198
1. Spring and Java >> JUnit 5 Tutorial: Writing Nested Tests [petrikainulainen.net] Hierarchical tests were sometimes entirely missing in the old JUnit. >> Benchmarking JDK...
View ArticleA Guide to Java Profilers
1. Overview Sometimes writing code that just runs is not enough. We might want to know what goes on internally such as how memory is allocated, consequences of using one coding approach over another,...
View ArticleIntroduction to StreamEx
1. Overview One of the most exciting features of Java 8 is the Stream API – which, simply put, is a powerful tool for processing sequences of elements. StreamEx is a library that provides additional...
View ArticleAdvanced Querying in Apache Cayenne
1. Overview Previously, we’ve focused on how to get started with Apache Cayenne. In this article, we’ll cover how to write simple and advanced queries with the ORM. 2. Setup The setup is similar to...
View ArticleIntroduction to Caffeine
1. Introduction In this article, we’re going to take a look at Caffeine — a high-performance caching library for Java. One fundamental difference between a cache and a Map is that a cache evicts...
View ArticleAnt vs Maven vs Gradle
1. Introduction In this article, we’ll explore three Java build automation tools which dominated the JVM ecosystem – Ant, Maven, and Gradle. We’ll introduce each of them and explore how Java build...
View ArticleActiviti Kickstart App and Activiti Rest Webapp
1. Overview In our previous articles (based on Activiti API with Java and Spring), we saw how to manage processes programmatically. If we want to set up a demo, along with the UI for Activiti, we have...
View ArticleBubble Sort in Java
1. Introduction In this quick article, we’ll explore the Bubble Sort algorithm in detail, focusing on a Java implementation. This is one of the most straightforward sorting algorithms; the core idea...
View ArticleJava Weekly, Issue 199
Lots of interesting writeups on Java 9 this week. Here we go… 1. Spring and Java >> Migrating a Spring Boot application to Java 9 – Compatibility [blog.frankel.ch] An interesting case study...
View ArticleCommits and NRT Search in SolrCloud
1. Overview Solr is one of the most popular Lucene-based search solutions. It’s fast, distributed, robust, flexible and has an active developer community behind it. SolrCloud is the new, distributed...
View ArticleSpring MVC Guides
The Spring MVC project provides tools that can be used for fast development of web applications in the MVC architecture. >> Spring MVC Tutorial Starting at the top – this is a simple Spring MVC...
View ArticleA Guide to Java Bytecode Manipulation with ASM
1. Introduction In this article, we’ll look at how to use the ASM library for manipulating an existing Java class by adding fields, adding methods, and changing the behavior of existing methods. 2....
View ArticleMathematical and Aggregate Operators in RxJava
1. Introduction Following the introduction to RxJava article, we’re going to look at aggregate and mathematical operators. These operations must wait for the source Observable to emit all items....
View ArticleMapping Nested Values with Jackson
1. Overview A typical use case when working with JSON is to perform a transformation from one model into another. For example, we might want to parse a complex, densely nested object graph into a more...
View ArticleHow to Calculate Levenshtein Distance in Java?
1. Introduction In this article, we describe the Levenshtein distance, alternatively known as the Edit distance. The algorithm explained here was devised by a Russian scientist, Vladimir Levenshtein,...
View ArticleJava Weekly, Issue 200
Let’s jump right in. 1. Spring and Java >> Enabling Two-factor Authentication For Your Web Application [techblog.bozho.net] A quick and practical example of a 2FA implementation with Spring....
View ArticleA Guide to the Static Keyword in Java
1. Introduction In this article, we’ll explore the static keyword of the Java language in detail. We’ll find how we can apply keyword static to variables, methods, blocks, nested classes and what...
View ArticleQuick Guide to Micrometer
1. Introduction Micrometer provides a simple facade over the instrumentation clients for a number of popular monitoring systems. Currently, it supports the following monitoring systems: Atlas,...
View ArticleSpring Data JPA – Adding a Method in All Repositories
1. Overview Spring Data makes the process of working with entities a lot easier by merely defining repository interfaces. These come with a set of pre-defined methods and allow the possibility of...
View Article