O'Reilly logo

Mastering Spring Application Development by Anjana Mankale

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

Spring Boot with Thymeleaf and Maven

In this section, we will see how we can use Spring boot to create a Spring with Thymeleaf application.

The pre-requisite for this operation is Maven, which should be installed. To check if Maven is installed, type the following command in to the Command Prompt:

mvn –version
  1. Use the archetype to generate a Spring boot with a thymeleaf project:
    mvn archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart -DgroupId=com.packt.demo -DartifactId=spring-boot-thymeleaf -interactiveMode=false
    

    The preceding command will create a spring-boot-thymeleaf directory. This can be imported into Eclipse IDE.

  2. You will open the pom.xml file and add a parent project:
    <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> ...

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