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

Freemarker

Freemarker is a template engine that can be used to generate dynamic HTML output. It is not limited to HTML pages; it can generate any kind of text output, such as emails, and reports. In order to use this, we have to write a template file using the Freemarker syntax. The Freemarker engine then receives the file, along with data to generate the resulting dynamic text.

Now, let's try to configure Freemarker to render our Fibonacci series. In order to use Freemarker for our 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 Brevity ...

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