带有MVC的Spring 3 JSON [英] Spring 3 JSON with MVC

查看:111
本文介绍了带有MVC的Spring 3 JSON的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法构建 Spring Web 调用,分别使用和生成 application / json 格式化的请求和响应?

Is there a way to build Spring Web calls that consume and produce application/json formatted requests and responses respectively?

也许这不是 Spring MVC ,我不确定。我正在寻找与 Jersey / JSON 类似的Spring库。最好的情况是,如果有一个注释,我可以添加到Controller类,将其转换为 JSON 服务调用。

Maybe this isn't Spring MVC, I'm not sure. I'm looking for Spring libraries that behave in a similar fashion to Jersey/JSON. The best case would be if there was an annotation that I could add to the Controller classes that would turn them into JSON service calls.

A显示如何使用JSON构建 Spring Web Services 的教程非常棒。

A tutorial showing how to build Spring Web Services with JSON would be great.

编辑:我正在寻找一种基于注释的方法(类似于泽西岛)。

I'm looking for an annotation based approach (similar to Jersey).

EDIT2:像泽西岛一样,我是寻找REST支持(POST,GET,DELETE,PUT)。

Like Jersey, I am looking for REST support (POST,GET,DELETE,PUT).

EDIT3:最优选的是,这将是 pom.xml 条目和一些有关使用spring-js和jackson Spring原生版本的信息。

Most preferably, this will be the pom.xml entries and some information on using the spring-js with jackson Spring native version of things.

推荐答案

如果其他人员稍后到此处:
http://blog.springsource.com/2010/01/25/ajax-simplifications-in-spring-3-0/
对我来说是最有用的链接。这最终让我理解了模型(经过不到一天的搜索)。

In case other ppl get here later: http://blog.springsource.com/2010/01/25/ajax-simplifications-in-spring-3-0/ was the most useful link for me. That finally made me understand the model (after less than a day of searching).

这篇关于带有MVC的Spring 3 JSON的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆