

It is an Java Expression Language enabling Thymeleaf files to access the data from the model. Public String hello(Model model, required=false, defaultValue="World") String name). In the production environment, when a Spring Boot application is launched from a jar file, the devtools is auto disabled Ĭreate a Spring Boot controller file to map HTTP requests to Thymeleaf view template files However, to leverage that, you need to configure your IDE to auto-save and auto-compile when files are modified The library versions can be omitted as it will be resolved by the parent pom provided by Spring Boot Īpart from that, we also use the spring-boot-devtools dependency to auto-trigger an application restart or live reload in the development environment whenever Java class or static files on class-path change, respectively. Spring-boot-starter-thymeleaf provides the support for compiling Thymeleaf files

Spring-boot-starter-web provides all the dependencies and auto-configuration we need to develop a web application in Spring Boot, including the Tomcat embedded servlet container

Thymeleaf view template files would be created inside src/main/resources/templatesĬSS and JavaScript files would be created inside src/main/resources/staticĪpplication.properties is a configuration file used by Spring Boot, would be created inside src/main/resourcesĪpplication.java is a launch file for Spring Boot to start the application, would be created inside src/main/java Project dependenciesįor a Spring Boot Thymeleaf web application, we will need the following dependencies on the pom.xml file Web controller classes are used for mapping user requests to Thymeleaf template files, would be created inside src/main/java Pom.xml is the configuration file used by Maven to manage project dependencies and build process, it is usually placed in the project root directory You can create and init a new Spring Boot project by using Spring Initializr or your IDEįollowing is the final project structure with all the files we would create ├── src
