<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>深蓝的blog &#187; RssChannelHttpMessageConverter</title>
	<atom:link href="http://www.lanxinbase.com/?feed=rss2&#038;tag=rsschannelhttpmessageconverter" rel="self" type="application/rss+xml" />
	<link>http://www.lanxinbase.com</link>
	<description>记录日常生活</description>
	<lastBuildDate>Sat, 18 Apr 2026 07:10:07 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.3</generator>
	<item>
		<title>使用 Spring MVC HttpMessageConverter 功能构建 RESTful web 服务</title>
		<link>http://www.lanxinbase.com/?p=1765</link>
		<comments>http://www.lanxinbase.com/?p=1765#comments</comments>
		<pubDate>Sun, 24 Sep 2017 06:17:25 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[1.服务端语言]]></category>
		<category><![CDATA[AtomFeedHttpMessageConverter]]></category>
		<category><![CDATA[FormHttpMessageConverter]]></category>
		<category><![CDATA[MappingJacksonHttpMessageConverter]]></category>
		<category><![CDATA[MarshallingHttpMessageConverter]]></category>
		<category><![CDATA[RssChannelHttpMessageConverter]]></category>
		<category><![CDATA[Spring MVC]]></category>
		<category><![CDATA[StringHttpMessageConverter]]></category>

		<guid isPermaLink="false">http://www.lanxinbase.com/?p=1765</guid>
		<description><![CDATA[随附文章，“使用 Spring 3 构建 RESTful web 服务”（参见 参考资料），介绍了使用 Spring 构建 RESTful web 服务的方式。还解释了如何使用 ContentNegotiatingViewResolver 生成多个具象，这是 RESTful web 服务的一个重要功能。本文还阐述了使用 HttpMessageConverter 生成多个具象的另一种方式，并且本文中的示例展示了如何使用 RestTemplate 和 HttpMessageConverter 与服务进行通信。

Spring MVC 中的 REST 支持

本部分提供了支持 RESTful web 服务的主要 Spring 功能（或注释）的概述。

@Controller
使用 @Controller 注释对将成为 MVC 中控制器的类进行注释并处理 HTTP 请求。
@RequestMapping
使用 @RequestMapping 注释对函数进行注释，该函数处理某些 HTTP 方法、URI 或 HTTP 头。此注释是 Spring REST 支持的关键。可以更改 method 参数以处理其他 HTTP 方法。
例如：

1
2
@RequestMapping(method=RequestMethod.GET, value="/emps",
headers="Accept=application/xml, application/json")
@PathVariable
使用 @PathVariable 注释可将 URI 中的路径变量作为参数插入。
例如：]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=1765</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
