Spring Boot project structure

Spring Boot project structure

Explorer

  • .devcontainernew
  • devcontainer.jsonnew
  • .mvn
  • .vscodenew
  • extensions.jsonnew
  • settings.jsonnew
  • launch.jsonnew
  • confignew
  • src
  • target…, not committed
  • .editorconfig
  • .envnew, not committed
  • .env.examplenew
  • .gitattributes
  • .git-blame-ignore-revsnew
  • .gitignore
  • .sdkmanrcnew
  • AGENTS.mdnew
  • CLAUDE.mdnew
  • compose.yaml
  • HELP.md, not committed
  • lefthook.ymlnew
  • mvnw
  • mvnw.cmd
  • pom.xml
  • README.md
  1. # Generate the project on start.spring.io (or the same call from a terminal)

    curl https://start.spring.io/starter.zip -d type=maven-project -d javaVersion=25 -d configurationFileFormat=yaml -d groupId=com.example -d artifactId=shop -d dependencies=web,data-jpa,postgresql,flyway,validation,actuator,testcontainers,docker-compose -o shop.zip
  2. # Unzip and open it

    unzip shop.zip -d shop && cd shop
  3. # Run it (starts PostgreSQL from compose.yaml for you)

    ./mvnw spring-boot:run
  4. # Run the tests (needs Docker for Testcontainers)

    ./mvnw verify