New Thymeleaf integration module for Spring 4

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

New Thymeleaf integration module for Spring 4

This post was updated on .
We've just released thymeleaf-spring4 version 2.1.2.RELEASE, the first version of our new integration module for Spring 4, which was published last week.

At this moment, this new module offers almost exactly the same functionality as thymeleaf-spring3, but correctly implements support for the RequestDataValueProcessor interface modified in Spring 4, which enables websites to implement protection against CSRF attacks.

Users migrating from thymeleaf-spring3 to thymeleaf-spring4 will only need to replace the ".spring3." part of the package names of used classes with ".spring4." For example:

is now:

And also, if you are using the XHTML DTDs, this:

The new .jar has been included into the distribution .zip file downloadable from SourceForge. It can also be downloaded via Maven by configuring the following dependency:


The Thymeleaf website has been updated in order to link to the javadoc of the new library: 

Tutorials and example applications will soon be updated. Note that Thymeleaf's support for Spring 3.x will continue.

For those still using Thymeleaf 2.0, the next version of this release branch (2.0.20) will also include a thymeleaf-spring4 package.

Lastly, the thymeleaf-testing library has been also updated (new version: 2.1.2.RELEASE) in order to include support for testing both using thymeleaf-spring3 with Spring 3.x, and thymeleaf-spring4 with Spring 4.x. Related to this, new tests and infrastructure have been added to the thymeleaf-tests repository, in order to set up automatic testing of the Thymeleaf + Spring 4 integration as a part of the Thymeleaf development and build process.