Book Image

Mastering Spring Application Development

By : Anjana Mankale
Book Image

Mastering Spring Application Development

By: Anjana Mankale

Overview of this book

Table of Contents (19 chapters)
Mastering Spring Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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>
      <version>1.1.8.RELEASE</version>
    </parent>
  3. Start adding a dependency to the pom.xml file:

    <dependencies>
      <dependency>
      <groupId&gt...