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
- 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. - You will open the
pom.xml
file and add aparent
project:<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.1.8.RELEASE</version> </parent>
- Start adding a dependency to the
pom.xml
file:<dependencies> <dependency> <groupId...