A Spring Boot study repository split into three isolated environments. Each top-level folder is a separate devcontainer with its own host ports, so all three can run at the same time without competing for a port.
| Folder | Purpose | Tooling | Host ports |
|---|---|---|---|
class-content/ |
Coursework: theory/ and exercises/ |
minimal | 8082, 5005 |
playground/ |
Personal experiments | full | 8085, 5006 |
projects/ |
The graded college project | full | 8083, 5007 |
docker/ |
Dockerfile and Compose file for all three | — | — |
.devcontainer/ |
One devcontainer definition per environment | — | — |
Java 21, Maven, Spring Boot 3.5. Every folder has its own CLAUDE.md covering
what is specific to it.
Assignments, throwaway experiments and a graded project have incompatible needs. Sharing one workspace means the graded project fills up with scratch files, and a broken experiment can break the thing being submitted. Separate containers make that impossible: nothing installed in one reaches the others.
The tooling differs on purpose too. class-content gets the bare minimum so
that an exercise cannot lean on anything that will not be there in an exam;
the other two get the full set.
Open the repository in VS Code and reopen it in one of the three devcontainers. Without VS Code, start the containers by hand:
docker compose -f docker/docker-compose.yml up -d
Either way the containers only idle — they do not start an application. Run one from inside the container you attached to:
mvn spring-boot:run
- Inside a container, every application listens on
8081and the debugger on5005. The differing host ports exist only indocker/docker-compose.yml; no Java configuration ever mentions them. Keep it that way — the moment an application hardcodes 8082, it stops being portable to another environment. - Test and analysis tooling belongs in
pom.xml, not in the image. JUnit, Checkstyle, JaCoCo and SpotBugs are Maven dependencies and plugins. This is the main way Java differs from Python, wherepytestandpylintare installed into the environment itself. The image carries only the JDK and Maven. - Debugging needs no setup. The JDWP agent ships with the JVM. Start the
application with
-Dspring-boot.run.jvmArguments="$JAVA_DEBUG_OPTS"and attach a debugger to that folder's host debug port.