Skip to main content

Produces

Learn Produces (Controllers, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes produces is a mapping condition that declares the media type a handler returns, such as produces = "application/json" . Content negotiation : Spring compares the request Accept header with produces ; no match gives 406 Not Acceptable . Response header : the chosen type is written into the response Content-Type .

More lessons in Controllers