Spring Boot sample project for the interview exercise.
- Java 21 (JDK). Verify with
java -version. - Network access on first build. The project uses a Spring Boot snapshot parent (
3.5.x-SNAPSHOT), so Maven must reachhttps://repo.spring.io/snapshotto resolve dependencies.
Optional:
- Maven 3.9+ if you prefer
mvninstead of the wrapper. Otherwise the included Maven Wrapper (mvnw/mvnw.cmd) is enough.
From the project root:
Linux / macOS / WSL
./mvnw spring-boot:runIf you see Permission denied on ./mvnw, either run chmod +x mvnw once or invoke the wrapper explicitly:
bash mvnw spring-boot:runWindows (Command Prompt or PowerShell)
.\mvnw.cmd spring-boot:runThe app starts on the default Spring Boot port 8080 unless you override it (for example server.port=9090 in src/main/resources/application.properties or --server.port=9090 on the command line).
After startup, open or call:
http://localhost:8080/api/foo
You should get the plain text response ok.
./mvnw testOn Windows: .\mvnw.cmd test.
./mvnw packageRun the JAR:
java -jar target/inventory-0.0.1-SNAPSHOT.jar