Accessing Spring MVC Model Objects in JavaScript 1. Overview In this tutorial, we’re going to show how to access Spring MVC objects in Thymeleaf views that contain JavaScript code. We’ll use Spring Boot and the Thymeleaf template engine in our examples, but the idea works for other template engines as well.… Continue Reading spring-mvc-model-objects-js

Functional Controllers in Spring MVC 1. Introduction Spring 5 introduced WebFlux, a new framework that lets us build web applications using the reactive programming model. In this tutorial, we’ll see how we can apply this programming model to functional controllers in Spring MVC. 2. Maven Setup We’ll be using Spring… Continue Reading spring-mvc-functional-controllers

Introduction to Using FreeMarker in Spring MVC 1. Overview FreeMarker is a Java based template engine from the Apache Software Foundation. Like other template engines, FreeMarker is designed to support HTML web pages in applications following the MVC pattern. This tutorial illustrates how to configure FreeMarker for use in Spring… Continue Reading freemarker-in-spring-mvc-tutorial

Spring Custom Property Editor 1. Introduction Simply put, Spring uses property editors heavily for managing conversion between String values and custom Object types; this is based on Java Beans PropertyEditor. In this tutorial, we’ll go over two different use cases for demonstrating automatic property editor binding and custom property editor… Continue Reading spring-mvc-custom-property-editor

Using a Custom Spring MVC’s Handler Interceptor to Manage Sessions Spring MVC 1. Introduction In this tutorial, we are going to focus on the Spring MVC HandlerInterceptor. More specifically, we will show a more advanced use case for using interceptors – we’ll emulate a session timeout logic by setting custom… Continue Reading spring-mvc-custom-handler-interceptor