Repositories with Multiple Spring Data Modules 1. Introduction Sometimes we need to connect to more than one database technology in the same application. In this tutorial, we’ll explore the various configuration options when it comes to using multiple Spring Data modules in the same application. Let’s use a toy Spring… Continue Reading spring-multiple-data-modules

Spring Scheduling Annotations 1. Overview When single-threaded execution isn’t enough, we can use annotations from the org.springframework.scheduling.annotation package. In this quick tutorial, we’re going to explore the Spring Scheduling Annotations. 2. @EnableAsync With this annotation, we can enable asynchronous functionality in Spring. We must use it with @Configuration: @Configuration @EnableAsync… Continue Reading spring-scheduling-annotations

Difference between <context:annotation-config> vs <context:component-scan> Spring 1. Overview In this tutorial, we’re going to learn about the differences between two major XML configuration elements of Spring: <context:annotation-config> and <context:component-scan>. 2. Bean Definitions As we all know, Spring provides us with two ways to define our beans and dependencies: XML configuration and Java… Continue Reading spring-contextannotation-contextcomponentscan

CDI Interceptor vs Spring AspectJ 1. Introduction The Interceptor pattern is generally used to add new, cross-cutting functionality or logic in an application, and has solid support in a large number of libraries. In this article we’ll cover and contrast two of these major libraries: CDI interceptors and Spring AspectJ.… Continue Reading cdi-interceptor-vs-spring-aspectj

REST Query Language Over Multiple Tables with Querydsl Web Support REST Spring 1. Overview In this tutorial, we’ll continue with the second part of Spring Data Querydsl Web Support. Here, we’ll focus on associated entities and how to create queries over HTTP. Following the same configuration used in part one, we’ll… Continue Reading rest-querydsl-multiple-tables