Optimizing Spring Integration Tests
1. Introduction In this article, we’ll have a holistic discussion about integration tests using Spring and how to optimize them. First, we’ll briefly discuss the importance of integration tests and...
View ArticleCopy a List to Another List in Java
1. Overview In this quick tutorial, we’ll show different ways to copy a List to another List and a common error produced in the process. For an introduction to the use of Collections, please refer to...
View ArticleSpring Security Custom AuthenticationFailureHandler
1. Overview In this quick tutorial, we’re going to illustrate how to customize Spring Security’s authentication failures handling in a Spring Boot application. The goal is to authenticate users using...
View ArticleCommon Java Exceptions
1. Introduction This tutorial focuses on some common Java exceptions. We’ll start by discussing what an exception basically is. Later, we’ll discuss different types of checked and unchecked exceptions...
View ArticleIntroduction to Micronaut Framework
1. What is Micronaut Micronaut is a JVM-based framework for building lightweight, modular applications. Developed by OCI, the same company that created Grails, Micronaut is the latest framework...
View ArticleSpring REST and HAL Browser
1. Overview In this tutorial, we’ll be discussing what HAL is and why it’s useful, before introducing the HAL browser. We’ll then use Spring to build a simple REST API with a few interesting endpoints...
View ArticleJava Weekly, Issue 238
Here we go… 1. Spring and Java >> The best way to use SQL functions in JPQL or Criteria API queries with JPA and Hibernate [vladmihalcea.com] If we’re building the JPQL dynamically using...
View ArticleUploading MultipartFile with Spring RestTemplate
1. Overview This quick tutorial focuses on how to upload a multipart file using Spring’s RestTemplate. We’ll see both a single file and multiple files – upload using the RestTemplate. 2. What is an...
View ArticleIdiomatic Logging in Kotlin
1. Introduction In this tutorial, we’ll take a look at a few logging idioms that fit typical Kotlin programming styles. 2. Logging Idioms Logging is a ubiquitous need in programming. While apparently...
View ArticleGuide to JMapper
1. Overview In this tutorial, we’ll explore JMapper – a fast and easy to use mapping framework. We’ll discuss different ways to configure JMapper, how to perform custom conversions, as well as...
View ArticleTest a REST API with curl
1. Overview This tutorial gives a brief overview of testing a REST API using curl. curl is a command-line tool for transferring data and supports about 22 protocols including HTTP. This combination...
View ArticleBuild a Jar with Maven and Ignore the Test Results
1. Introduction This quick tutorial shows how to build a jar with Maven while ignoring the test results. By default, Maven runs unit tests automatically while building the project. However, there are...
View ArticleSpring Webflux and CORS
1. Overview In a previous post, we learned about Cross-Origin Resource Sharing (CORS) specification and how to use it within Spring. In this quick tutorial, we’ll set up a similar CORS configuration...
View ArticleSpring Webflux with Kotlin
1. Overview In this tutorial, we demonstrate how to use Spring WebFlux module using Kotlin programming language. We illustrate how to use the annotation-based and the lambda-based style approaches in...
View ArticleGuide to Apache Avro
1. Overview Data serialization is a technique of converting data into binary or text format. There are multiple systems available for this purpose. Apache Avro is one of those data serialization...
View ArticleInitializing HashSet at the Time of Construction
1. Overview In this quick tutorial, we’ll introduce various methods of initializing the HashSet with values, at the time of its construction. If you’re instead looking to explore the features of...
View ArticleHow to Trigger and Stop a Scheduled Spring Batch Job
1. Overview In this tutorial, we’ll investigate and compare different ways to trigger and stop a scheduled Spring Batch job for any required business cases. If you need introductions about Spring...
View ArticleA Guide to Message Driven Beans in EJB
1. Introduction Simply put, an Enterprise JavaBean (EJB) is a JEE component that runs on an application server. In this tutorial, we’ll discuss Message Driven Beans (MDB), responsible for handling...
View ArticleA Guide to Eclipse JNoSQL
1. Overview Eclipse JNoSQL is a set of APIs and implementations that simplify the interaction of Java applications with NoSQL databases. In this article, we’ll learn how to set up and configure JNoSQL...
View ArticleGetting a File’s Mime Type in Java
1. Overview In this tutorial, we’ll take a look at various strategies for getting MIME types of a file. We’ll look at ways to extend the MIME types available to the strategies, wherever applicable....
View Article