This tutorial walks you through the steps of creating a Hello World web app example with Spring Boot and Thymeleaf

What you'll build

What you'll need

  • JDK 8+ or OpenJDK 8+
  • Maven 3+

Project structure

Project dependencies


Hello Controller

Controller maps HTTP Requests with View.


@RequestMapping maps /hello request to hello() method.

name is a query string parameter of /hello request.

Model object passes value to hello view (hello.ftl).

View Template


Static files



Application Configurations



Run with Maven

Type this bash command at the example root directory and visit to localhost:8080

mvn clean spring-boot:run

Source code

https://github.com/hellokoding/hellokoding-courses/tree/master/springboot-examples/springboot-thymeleaf-helloworld