Web & REST
Nearly every Java backend engineer builds HTTP APIs. This domain covers the full stack from HTTP protocol fundamentals through Spring MVC (the synchronous model) and WebFlux (the reactive model). REST design principles, proper status codes, content negotiation, and API documentation with OpenAPI are the practical skills interviewers probe here.
What You'll Find Here
| Topic | Note | Description |
|---|---|---|
| HTTP Fundamentals | http-fundamentals.md | Methods, status codes, headers, content negotiation, HTTP/2 basics. |
| REST Design | rest-design.md | Resources, representations, HATEOAS, versioning strategies, idempotency. |
| Spring MVC | spring-mvc.md | @RestController, @RequestMapping, @PathVariable, @RequestBody, ResponseEntity. |
| Exception Handling | exception-handling.md | @ExceptionHandler, @ControllerAdvice, ProblemDetail (RFC 9457). |
| WebFlux & Reactive | webflux-reactive.md | Mono, Flux, functional endpoints, backpressure, when to choose reactive. |
| OpenAPI & Springdoc | openapi-springdoc.md | Generating API documentation with springdoc-openapi; @Operation, @Schema. |
Learning Path
- HTTP Fundamentals — status codes (200/201/400/401/403/404/409/500) and idempotency are first-round interview questions.
- REST Design — resource naming, HTTP verbs, and versioning strategies signal seniority.
- Spring MVC — the
@RestControllermodel is the default for most Spring Boot APIs. - Exception Handling —
@ControllerAdvice+ RFC 9457ProblemDetailis the current best practice. - WebFlux & Reactive — study after MVC; reactive is adopted for high-throughput scenarios but adds complexity.
- OpenAPI & Springdoc — auto-generate live API documentation from Spring annotations.
Related Domains
- Spring Boot —
spring-boot-starter-webbootstraps the Spring MVC stack. - Spring Security — authentication and CORS configuration live at the web layer.
- Testing —
MockMvcandWebTestClientare the tools for testing Spring MVC and WebFlux controllers.