Search⌘ K
AI Features

Structure of a Spring Application

Explore the fundamental structure of a Spring Boot application by examining its essential files and their roles. Understand how to run the application using Maven and customize settings such as the server port through the application.properties file. This lesson helps you gain clarity on setting up and managing a Spring project for scalable application development with Thymeleaf and Spring Boot.

Let’s look at the basic structure of a Spring application and interpret its individual files.

Shell
|-- mvn
|-- mvnw
|-- mvnw.cmd
|-- pom.xml
|-- src
| |-- main
| | |-- java
| | | `-- com
| | | `-- tamingthymeleaf
| | | `-- application
`-- TamingThymeleafApplication.java
| | `-- resources
`-- application.properties
| | `-- templates
| `-- test
| `-- java
| `-- com
| `-- tamingthymeleaf
| `-- application
`-- TamingThymeleafApplicationTests.java

Description of the files

  1. The .mvn folder is a hidden folder by default. It allows Maven to be run without being installed.
  2. The Maven project file pom.xml is the core file that is configured with the selected dependencies and the springboot-maven-plugin to generate the
...