Thymeleaf integration with Spring (Part 2)

1 Introduction This is the second part of the Thymeleaf integration with Spring tutorial. You can read the first part here, where you will learn how to configure this project. As explained at the beginning of the first part of this tutorial, the web application will send two types of…

Thymeleaf integration with Spring (Part 1)

1 Introduction This article is focused on how Thymeleaf can be integrated with the Spring framework. This will let our MVC web application take advantage of Thymeleaf HTML5 template engine without losing any of the Spring features. The data layer uses Spring Data to interact with a mongoDB database. The…

Migrating Spring MVC RESTful web services to Spring 4

1 Introduction Spring 4 brings several improvements for MVC applications. In this post I will focus on restful web services and try these improvements by performing a migration from Spring MVC 3.2 to Spring 4.0. We will take a project implemented with Spring 3.2 and perform the steps to upgrade it…

Retry web service operations with RequestHandlerRetryAdvice

1 Introduction Sometimes when invoking a web service, we may be interested in retrying the operation in case an error occurs. When using Spring Integration, we can achieve this functionality with RequestHandlerRetryAdvice class. This class will allow us to retry the operation for a specified number of times before giving…

How error handling works in Spring Integration

1 Introduction The target of this post is to show you how error handling works in Spring Integration, using the messaging system. You will see that error handling is different between synchronous and asynchronous messaging. As usual, I’ll skip the chat and proceed with some examples. You can get the…

Spring Integration – Using RMI Channel Adapters

1 Introduction This article explains how to send and receive messages over RMI using Spring Integration RMI channel adapters. It is composed of the following sections: Implement the service: The first section focuses on creating and exposing a service. Implement the client: Shows how to invoke the service using the…

Creating contract-first web services with Spring WS

1 Introduction This article explains how to implement and test SOAP web services with Spring WS project. This example uses JAXB2 for (un)marshalling. To develop the service, I’ll use the contract-first approach, which consists in defining the service contract first, and based on this contract implement the service. The article is…

Processing messages in transactions with Spring JMS

1 Introduction This post shows how to process messages in transactions with Spring JMS. We will see how an error in the execution of the consumer during the asynchronous reception of messages with JMS, can lead to the loss of messages. I then will explain how you can solve this…

Introduction to messaging with Spring JMS

1 Introduction to Spring JMS In this post I will show you how to configure a standalone application in order to see different ways of sending and receiving messages using Spring JMS. Basically, I will divide the examples into the following sections: Point-to-point messaging (queue) Synchronous reception Asynchronous reception Publish-subscribe…

Applying aspect oriented programming

1 Introduction This article explains how to apply aspect oriented programming with Spring AOP. The main target of the aspect oriented programming is the separation of cross-cutting concerns. When we talk about cross-cutting concerns we are referring to generic functionality that is used in several places in our system or…