Skip to main content

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

Notes are being added. Planned topics:

TopicDescription
HTTP FundamentalsMethods, status codes, headers, content negotiation, HTTP/2 basics.
REST DesignResources, representations, HATEOAS, versioning strategies, idempotency.
Spring MVC@RestController, @RequestMapping, @PathVariable, @RequestBody, ResponseEntity.
Exception Handling@ExceptionHandler, @ControllerAdvice, ProblemDetail (RFC 7807).
WebFlux & ReactiveMono, Flux, functional endpoints, backpressure, when to choose reactive.
OpenAPI & SpringdocGenerating API documentation with springdoc-openapi; @Operation, @Schema.

Learning Path

  1. HTTP Fundamentals — status codes (200/201/400/401/403/404/409/500) and idempotency are first-round interview questions.
  2. REST Design — resource naming, HTTP verbs, and versioning strategies signal seniority.
  3. Spring MVC — the @RestController model is the default for most Spring Boot APIs.
  4. Exception Handling@ControllerAdvice + RFC 7807 ProblemDetail is the current best practice.
  5. WebFlux — study after MVC; reactive is adopted for high-throughput scenarios but adds complexity.
  • Spring Bootspring-boot-starter-web bootstraps the Spring MVC stack.
  • Spring Security — authentication and CORS configuration live at the web layer.
  • TestingMockMvc and WebTestClient are the tools for testing Spring MVC and WebFlux controllers.