Spring MVC Articles
-
How to Receive Request Parameters in Spring Boot - Choosing Between @RequestParam, @PathVariable, @RequestBody, and @ModelAttribute
A guide to the four annotations for receiving client input in Spring Boot Controllers—@RequestParam, @PathVariable, @RequestBody, and @ModelAttribute—with criteria for choosing between them based on the input source: query strings, path variables, JSON bodies, and forms. Covers required/defaultValue, multiple values with List, and the 400 behavior on type conversion failures with implementation examples.
-
Spring Boot REST API Versioning Strategies - Choosing Between URL Path, Header, and Content-Type
Compare three REST API versioning approaches in Spring Boot (URI path, custom header, Accept header) with implementation code. Includes decision criteria for choosing the right strategy for your team's API characteristics and Swagger UI integration examples.
-
Getting Started with Reactive Programming in Spring WebFlux - Differences from Spring MVC and When to Use Each
For Java developers familiar with Spring MVC, this article covers the non-blocking I/O mechanism of WebFlux, basic Mono/Flux operations, and endpoint implementation using RouterFunction. With a comparison table between Spring MVC and WebFlux and adoption criteria, you'll be able to decide whether to apply it to your own project.
-
Spring Boot Thymeleaf Server-Side Rendering Implementation Guide - Forms, Validation, and Security
A comprehensive implementation tutorial for Spring Boot 3.x × Thymeleaf 3.1, covering HTML responses, form handling, Bean Validation error display, and Spring Security integration (CSRF/authentication display switching). Based on code examples that work as-is.
-
Difference Between Interceptor and Filter in Spring Boot - With Implementation Samples for Request Pre/Post Processing
For those wondering which to use between Spring Boot's Filter and HandlerInterceptor, this article first presents the criteria for choosing between them. It organizes the differences in execution timing, Spring DI management, and available information, then explains use cases such as authentication checks, request logging, CORS, and exception handling with implementation samples.