Spring Data Composable Repositories
1. Introduction When modeling a real-world system or process, domain-driven design (DDD) style repositories are a good option. For this very purpose, we can use Spring Data JPA as our data access...
View ArticleHibernate Entity Lifecycle
1. Overview Every Hibernate entity naturally has a lifecycle within the framework – it’s either in a transient, managed, detached or deleted state. Understanding these states on both conceptual and...
View ArticleRemoving the First Element of an Array
1. Overview In this tutorial, we’ll look at how to remove the first element of an array. In addition, we’ll also see how using data structures from the Java Collections Framework makes things even...
View ArticleIntroduction to Netflix Archaius with Spring Cloud
1. Overview Netflix Archaius is a powerful configuration management library. Simply put, it’s a framework that can be used to gather configuration properties from many different sources, offering...
View ArticleIntroduction to Chaos Monkey
1. Introduction In this tutorial, we’re going to talk about Chaos Monkey for Spring Boot. This tool helps us introduce some of the principles of chaos engineering into our Spring Boot web applications...
View ArticleMock Static Method using JMockit
1. Overview Some popular mocking libraries such as Mockito and Easymock generate mock-ups by taking advantage of Java’s inheritance-based class model. EasyMock implements an interface at runtime,...
View ArticleJetty Configuration in Eclipse
1. Overview Web Applications are one of the most popular use cases of Java. Web Servers and Servlet Containers provide the runtime for deploying applications. Unfortunately, deploying and...
View ArticleSpring Component Scanning
1. Overview In this tutorial, we’ll cover component scanning in Spring. When working with Spring, we can annotate our classes in order to make them into Spring beans. But, besides that, we can tell...
View ArticleConfiguring a Hikari Connection Pool with Spring Boot
1. Overview Hikari is a JDBC DataSource implementation that provides a connection pooling mechanism. Compared to other implementations, it promises to be lightweight and better performing. For an...
View ArticleIntegration Testing with Maven
1. Overview Maven is the most popular build tool in the Java space, while integration testing is an essential part of the development process. Therefore, it’s a natural choice to configure and execute...
View ArticleSpring Integration Java DSL
1. Introduction In this tutorial, we’ll learn about the Spring Integration Java DSL for creating application integrations. We’ll take the file-moving integration we built in Introduction to Spring...
View ArticleDifference Between Throw and Throws in Java
1. Introduction In this tutorial, we’ll take a look at the throw and throws in Java. We’ll explain when we should use each of them. Next, we’ll show some examples of their basic usage. 2. Throw and...
View ArticleIterate Through a Range of Dates in Java
1. Overview In this quick tutorial, we’ll study several ways to iterate over a range of dates, using a start and end date, in Java 7, Java 8, and Java 9. 2. Java 7 Starting with Java 7, we’ll use the...
View ArticleSave Data to a JSON File with Gson
1. Overview Gson is a Java library that allows us to convert Java Objects into a JSON representation. We can also use it the other way around, to convert a JSON string to an equivalent Java object. In...
View ArticleWriting IntelliJ IDEA Plugins
1. Introduction Over the past few years, IntelliJ from JetBrains has quickly become the top IDE for Java developers. In our most recent State of Java report, IntelliJ was the IDE of choice for 55% of...
View ArticleDifference Between Flatmap and Switchmap in RxJava
1. Overview RxJava provides various operators to transform items emitted by an observable into other observables. Two of the most popular operators are flatMap and switchMap. The difference between...
View ArticleJava Weekly, Issue 243
Here we go… 1. Spring and Java >> Deep Dive into JUnit 5 Extension Model [infoq.com] This great writeup introduces a clever extension for creating and executing BDD specification tests. Very...
View ArticleJava Check a String for Lowercase/Uppercase Letter, Special Character and Digit
1. Overview In this quick tutorial, we’ll illustrate how we can check if a String is containing at least one of each of the following: uppercase letter, lowercase letter, digit or special character in...
View ArticleGuide to the Kotlin Exposed Framework
1. Introduction In this tutorial, we’re going to look at how to query a relational database using Exposed. Exposed is an open source library (Apache license) developed by JetBrains, which provides an...
View ArticleOverview and Need for DelegatingFilterProxy in Spring
1. Overview The DelegatingFilterProxy is a servlet filter that allows passing control to Filter classes that have access to the Spring application context. Spring Security relies on this technique...
View Article