Thymeleaf Interactive Tutorial

Exercise 20: conversion service

This exercise introduces the Spring Conversion Service integration from the What's New article.

  1. Two beans, releaseDate of type java.sql.TimeStamp and price of type Amount have been set into the context.
  2. Formatters for these types have also been registered using the Spring Conversion Service.
  3. Use the new ${{..}} syntax to format these beans using the Conversion Service.
  4. You can check the proposed solution by pressing the Show solution button () above the code editor.

Welcome to the Thymeleaf Interactive Tutorial. Thymeleaf version used in this tutorial is 2.1.5.RELEASE.

This interactive tutorial has been created by the Thymeleaf Team using The Thymeleaf Template Engine and other great open source tools like:

The tutorial is gracefully hosted at the Heroku Cloud Platform

Icons used in this app, except Thymeleaf logo, are created by Mark James

You can get the source code of this tutorial at GitHub.

You can find much more documentation on Thymeleaf at the Thymeleaf website.

For any questions or help, you can use the user forum.

Source code

Static view

Generated source

Dynamic view