摘要:
Spring 3,ContentNegotiatingViewResolver, is an interesting view resolver, which allow you to output a same resource (content or data) to different type of views likeJSP,XML,RSS,JSONand etc. Put it simple, see following web requested URL, which will return in different views. http://www.mkyong.co... 阅读全文
2012年11月23日 #
摘要:
In Spring 3, comes with a abstract class “AbstractRssFeedView” to generate RSS feed view, using java.net’s ROME package. In this tutorial, we show you how to generate a RSS feed view from Spring MVC framework.Technologies used : Spring 3.0.5.RELEASE ROME 1.0.0 JDK 1.6 Eclipse 3.6 ... 阅读全文
摘要:
In Spring 3, one of the feature of “mvc:annotation-driven“, is support for convert object to/from XML file, if JAXB is in project classpath.In this tutorial, we show you how to convert a return object into XML format and return it back to user via Spring @MVC framework.Technologies used : Spring... 阅读全文
摘要:
In Spring 3, you can enable “mvc:annotation-driven” to support object conversion to/from JSON format, ifJacksonJSON processor is existed on the project classpath.In this tutorial, we show you how to output JSON data from Spring MVC.Technologies used : Spring 3.0.5.RELEASE Jackson 1.7.1 J... 阅读全文