O'Reilly logo

Hands-On Reactive Programming with Reactor by Rahul Sharma

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Thymeleaf

Thymeleaf is a modem template engine that is based in Java and XML/HTML. It can be used to render any XML/HTML content. Templates built with Thymeleaf are of a natural order, meaning that they will render exactly how they are designed, unlike JSPs. This template engine is aimed at replacing JSPs. It has an excellent integration with Spring.

Now, let's try to configure Thymeleaf to render the Fibonacci series. In order to use Thymeleaf for view resolution, we must first add the required dependencies to our build.gradle, as follows:

plugins {    id "io.spring.dependency-management" version "1.0.1.RELEASE"    id "org.springframework.boot" version "2.0.3.RELEASE"}apply plugin: 'java'// Rest removed for Brevitydependencies { compile 'org.springframework.boot:spring-boot-starter-webflux' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required