What is the purpose of the `@ResponseBody` annotation in Spring?
`@ResponseBody` ensures that the controller returns a JSON response automatically without the need for any manual serialization.
Thatâ€™s partially correct. `@ResponseBody` does serialize the return object to JSON, but it doesnâ€™t automatically infer the format, such as XML.
Can you explain how Spring handles the content negotiation to return JSON or XML based on the request?