简体   繁体   English

在没有MVC的Spring中使用REST

[英]Use REST in Spring without MVC

I want to use REST in Spring without using MVC framework, but it seems they encourage using it with controllers only! 我想在Spring中使用REST,而不使用MVC框架,但似乎他们鼓励仅在控制器中使用它!

Can I do so without using controllers ?? 我可以不使用控制器而这样做吗? Is it advisable ? 这是明智的吗?

You can create Rest services without spring-mvc using Jersey. 您可以使用Jersey在没有spring-mvc的情况下创建Rest服务。

official : http://jersey.java.net/ 官方: http : //jersey.java.net/

examples: http://www.vogella.com/articles/REST/article.html 示例: http//www.vogella.com/articles/REST/article.html

Jersey w/ Spring 3.0? 球衣搭配春季3.0?

如果愿意,可以避免将Spring用于Web层内容,可以将JAX-RS与Spring配合使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM