Initializing Arrays in Java
1. Overview In this quick tutorial, we’re going to see the different ways in which we can initialize an array and the subtle differences between these. 2. One Element at a Time Let’s start with a...
View ArticleIntroduction to BouncyCastle with Java
1. Overview BouncyCastle is a Java library that complements the default Java Cryptographic Extension (JCE). In this introductory article, we’re going to show how to use BouncyCastle to perform...
View ArticleIntroduction to Apache Spark
1. Introduction Apache Spark is an open-source cluster-computing framework. It provides elegant development APIs for Scala, Java, Python, and R that allow developers to execute a variety of...
View ArticleMocking Void Methods with Mockito
1. Overview In this short tutorial, we focus on mocking void methods with Mockito. As with other articles focused on the Mockito framework (like Mockito Verify, Mockito When/Then, and Mockito’s Mock...
View ArticleMockito and JUnit 5 – Using ExtendWith
1. Introduction In this quick article, we’ll show how to integrate Mockito with the JUnit 5 extension model. To learn more about the JUnit 5 extension model, have a look at this article. First, we’ll...
View ArticleIntro to JDO Queries 2/2
1. Overview In the previous article in this series, we showed how to persist Java objects to different data stores. For more details, please check Guide to Java Data Objects. JDO supports different...
View ArticleDynamic Mapping with Hibernate
1. Introduction In this article, we’ll explore some dynamic mapping capabilities of Hibernate with the @Formula, @Where, @Filter and @Any annotations. Note that although Hibernate implements the JPA...
View ArticleDaemon Threads in Java
1. Overview In this short article, we’ll have a look at daemon threads in Java and see what can they be used for. We’ll also explain the difference between daemon threads and user threads. 2....
View ArticleJava Weekly, Issue 201
Lots of interesting writeups on Java 9 this week. Here we go… 1. Spring and Java >> Learning Java with jshell [javaspecialists.eu] A Quick intro of JShell makes it possible to explore Java...
View ArticleMaking Tomcat UTF-8-Ready
1. Introduction UTF-8 is the most common character encoding used in web applications. It supports all languages currently spoken in the world including Chinese, Korean, and Japanese. In this article,...
View ArticleActiviti with Spring Security
1. Overview Activiti is an open-source BPM (Business Process Management) system. For an introduction, check our Guide to Activiti with Java. Both Activiti and the Spring framework provide their own...
View ArticleJUnit 5 for Kotlin Developers
1. Introduction The newly released JUnit 5 is the next version of the well-known testing framework for Java. This version includes a number of features that specifically target functionality...
View ArticleHibernate – Mapping Date and Time
1. Introduction In this article, we’ll show how to map temporal column values in Hibernate, including the classes from java.sql, java.util and java.time packages. 2. Project Setup To demonstrate the...
View ArticleA Guide to Spring Boot Admin
1. Overview Spring Boot Admin is a web application, used for managing and monitoring Spring Boot applications. Each application is considered as a client and registers to the admin server. Behind the...
View ArticleIntroduction to Spring AOP
1. Introduction In this tutorial, we’ll introduce AOP (Aspect Oriented Programming) with Spring and start understanding how we can start using this powerful tool in practical scenarios. It’s also...
View ArticleJUnit5 @RunWith
1. Introduction In this quick article, we’ll cover the usage of the @RunWith annotation in the JUnit 5 framework. In JUnit 5, the @RunWith annotation has been replaced by the more powerful @ExtendWith...
View ArticleGuide to Spring Type Conversions
1. Introduction In this article, we’ll have a look at Spring’s type conversions. Spring provides out-of-the-box various converters for built-in types; this means converting to/from basic types like...
View ArticleGroovy Bean Definitions
1. Overview In this quick article, we’ll focus on how we can use a Groovy-based configuration in our Java Spring projects. 2. Dependencies Before we start, we need to add the dependency to our pom.xml...
View ArticleMocking of Private Methods Using PowerMock
1. Overview One of the challenges of unit testing is mocking private methods. In this tutorial, we’ll learn about how we can achieve this by using the PowerMock library – which is supported by JUnit...
View ArticleA Quick Guide to Using Keycloak with Spring Boot
1. Overview In this article, we’ll cover the basics of setting up a Keycloak server, how to connect a Spring Boot application to it, and how to use it with Spring Security. 2. What is Keycloak?...
View Article