Tagged articles
14 articles
Page 1 of 1
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 12, 2024 · Backend Development

How to Use Multiple @RequestBody Parameters in Spring Boot 3

This article explains why a Spring Boot controller can read the request body only once, demonstrates wrapping multiple objects in a DTO, and provides a custom HttpServletRequestWrapper with a filter to enable multiple @RequestBody parameters while noting the performance impact.

@RequestBodyHttpServletRequestWrapperSpring Boot
0 likes · 6 min read
How to Use Multiple @RequestBody Parameters in Spring Boot 3
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Apr 27, 2024 · Backend Development

Enabling Multiple @RequestBody Parameters in Spring MVC by Caching the Request Body

This article explains why Spring MVC cannot parse multiple @RequestBody annotations on a single handler method, analyzes the internal I/O stream closure that causes the failure, and provides a practical solution using a request‑body caching wrapper and a servlet filter to allow repeated reads of the request payload.

@RequestBodyBackendHTTP
0 likes · 9 min read
Enabling Multiple @RequestBody Parameters in Spring MVC by Caching the Request Body
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 24, 2023 · Backend Development

Create a Custom HttpMessageConverter in Spring Boot 2.6

This article demonstrates how to create a custom HttpMessageConverter in Spring Boot 2.6.12 to parse a simple “name:张三,age:20” string into a Users object, configure it in WebMvc, and explains the underlying Spring MVC request‑handling flow that invokes the converter.

@RequestBodyBackend DevelopmentCustom Converter
0 likes · 8 min read
Create a Custom HttpMessageConverter in Spring Boot 2.6
FunTester
FunTester
Oct 27, 2022 · Backend Development

How to Fix @RequestBody Compatibility and Swagger Timeout Issues in Spring Boot

This article explains why @RequestBody conflicts with Swagger in Spring Boot, outlines two common but cumbersome work‑arounds, describes a Swagger API timeout caused by Groovy's MetaClass, and provides a concise configuration fix that eliminates both the timeout and the compatibility issue.

@RequestBodyAPI documentationGroovy
0 likes · 4 min read
How to Fix @RequestBody Compatibility and Swagger Timeout Issues in Spring Boot
Java Architect Essentials
Java Architect Essentials
Jun 24, 2022 · Backend Development

Make a Spring MVC Endpoint Accept JSON, Form and Multipart in One Call

This article explains how to redesign a Spring MVC controller so that a single endpoint can seamlessly handle JSON payloads, URL‑encoded form data, and multipart file uploads by creating a custom annotation, resolver, and Spring configuration, avoiding the pitfalls of manual HttpServletRequest parsing.

@RequestBodyContent-TypeCustom Annotation
0 likes · 7 min read
Make a Spring MVC Endpoint Accept JSON, Form and Multipart in One Call
Programmer DD
Programmer DD
Sep 16, 2018 · Backend Development

Mastering @RequestBody and @ResponseBody in Spring MVC: A Quick Guide

This article explains how Spring MVC uses @RequestBody to deserialize JSON request bodies into Java objects and @ResponseBody to serialize Java objects back to JSON, providing clear code examples, curl testing, and notes on @RestController behavior.

@RequestBodyBackend DevelopmentJava
0 likes · 4 min read
Mastering @RequestBody and @ResponseBody in Spring MVC: A Quick Guide