Explore The Project Structure

After creating our project with Spring Initialzr, let's explore the structure and components that make up our Restaurant Review Platform project.

Main Project Components

Spring Boot follows a standard project layout that helps keep our code organized and maintainable.

Let's look at the key directories and files in our project:

restaurant/ ├── src/ │ ├── main/ │ │ ├── java/ │ │ │ └── com/devtiro/restaurant/ │ │ │ └── RestaurantApplication.java │ │ └── resources/ │ │ └── application.properties │ └── test/ │ └── java/ └── pom.xml

Understanding the POM File

The pom.xml file is our project's configuration center, containing all our dependencies and build settings.

Let's examine the dependencies we selected:

<dependencies> <!-- Spring Web for REST endpoints --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- Security and OAuth2 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-oauth2-resource-server</artifactId> </dependency> <!-- Elasticsearch for search capabilities --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-elasticsearch</artifactId> </dependency> <!-- Validation for data integrity --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> </dependency> <!-- Lombok for reducing boilerplate code --> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </dependency> </dependencies>

Source Code Organization

The src/main/java directory contains our application's Java source code.

The main application class RestaurantReviewApplication.java serves as the entry point:

@SpringBootApplication public class RestaurantReviewApplication { public static void main(String[] args) { SpringApplication.run(RestaurantReviewApplication.class, args); } }

The src/main/resources directory holds configuration files, with application.properties being the primary configuration file where we'll later add settings for Elasticsearch, security, and other components.

The src/test/java directory is where we'll place our test classes as we develop the application.

Summary

  • Project follows standard Spring Boot directory structure
  • pom.xml contains our selected dependencies for web, security, and search features
  • Main application class serves as the entry point
  • Resource files are stored in src/main/resources
© 2026 Devtiro Ltd. All rights reserved