Spring Boot Tutorial 0/110 lessons ~6 min read Lesson 6

    Project Structure

    A standard Spring Boot project follows a Maven layout.

    Course progress0%
    Focus
    3 guided sections
    Practice signal
    Examples included
    Career prep
    Foundation builder

    Introduction

    A standard Spring Boot project follows a Maven layout. Knowing where each file lives — and why — makes you instantly productive in any team's codebase.

    Syntax reference

    Reference layout:

    bash
    orders/
    ├── pom.xml # build config + deps
    ├── src/
    │ ├── main/
    │ │ ├── java/com/acme/orders/
    │ │ │ ├── OrdersApplication.java # @SpringBootApplication
    │ │ │ ├── controller/ # REST controllers
    │ │ │ ├── service/ # business rules
    │ │ │ ├── repository/ # Spring Data interfaces
    │ │ │ ├── domain/ # entities / records
    │ │ │ ├── dto/ # request / response shapes
    │ │ │ ├── config/ # @Configuration classes
    │ │ │ └── exception/ # @ControllerAdvice
    │ │ └── resources/
    │ │ ├── application.yml # config
    │ │ ├── db/migration/ # Flyway SQL
    │ │ └── static/ # public assets
    │ └── test/java/com/acme/orders/ # mirrors main/
    └── target/ # build output (gitignored)

    Best practices

    • Package by feature for large apps (orders/, billing/) — not by layer.
    • Keep OrdersApplication at the root package; component scan finds everything below.
    • Never commit target/ or IDE files; .gitignore from Initializr is correct.
    Ready to mark this lesson complete?Track your journey across the entire course.