Custom Content Negotiation
Learn Custom Content Negotiation (Content Negotiation, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes Custom content negotiation means you replace or extend how Spring decides the response media type, by writing your own ContentNegotiationStrategy . Typical need : choose the format from a custom header (for example X-Api-Version ), a cookie, the host name or the user agent. Register it with configurer.strategies(List.of(...)) in configureContentNegotiation .