根据请求的具体扩展名、请求头不同,返回不同格式的相同内容 发表于 2018-06-14 更新于 2025-01-23 分类于 Java全栈 , SSM框架 阅读次数: 内容协商多视图SpringMVC配置多视图-内容协商原理 <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"> <property name="contentNegotiationManager" ref="contentNegotiationManager"/> ... </bean> Spring MVC三种方式实现HTTP内容协商(Content Negotiation)