How fhnw-int/spring-boot-controller-solution works
Project type and purpose
• From the file tree and README, this is a single-module Spring Boot application named “pizza.”
• It exposes HTTP endpoints via two controllers (PizzaController and WelcomeController) and comes with a basic Maven build, unit tests, and a devcontainer for development.
File structure
• Top-level:
• .devcontainer/ : VS Code dev‐container definitions
• pizza/ : Maven project root
• README.md, .gitignore
• Inside pizza/:
• pom.xml, mvnw: Maven wrapper and project configuration
• src/main/java/ch/fhnw/pizza:
– PizzaApplication.java: Spring Boot entry point
– PizzaController.java: REST API for pizza resources
– WelcomeController.java: simple welcome endpoint
– Pizza.java: domain model class
• src/main/resources/application.properties: externalized config
• src/test/java/ch/fhnw/pizza: JUnit tests for the application
README
• Minimal description: “Spring-Boot-Solution” for Internet Technology course
• No additional architecture notes—so we’ll infer from code structure
a. Main components
1. External client (Browser, Mobile app, CLI tool)
2. HTTP layer (Embedded Tomcat in Spring Boot)
3. Controllers:
– WelcomeController
– PizzaController
4. Domain Model (Pizza.java)
5. (Optional placeholder) Persistence layer or in-memory store
6. Build & Dev:
– Maven (pom.xml, mvnw)
– Devcontainer (.devcontainer/ files)
7. Testing (JUnit test suite)
b. Relationships and interactions
• Client → HTTP(S) request → Embedded Tomcat
• Tomcat → DispatcherServlet → matching Controller
• Controller → maps requests to domain objects (Pizza instances)
• Domain → returned as JSON (via Spring MVC’s MessageConverters)
• Controller → (future) calls to repository/service layer → Database
• Build: Developer code commit → Maven compile/test → Docker/devcontainer
c. Architectural patterns
• Layered MVC:
• Presentation (Controllers)
• Domain (Models)
• Infrastructure (web server, build tools)
• Convention-over-configuration via Spring Boot
• Single-module monolith with clear separation of concerns
d. Key technologies
• Java 17+ (inferred)
• Spring Boot (starter-web)
• Spring MVC / REST
• Maven / wrapper
• JUnit 5
• VS Code Devcontainer (Docker)