[英]How to host a java RESTful web service for android app
I am looking to develop a java REST web service to work with my android app that I am also developing and I have been trying to look for the best option to host the service and everything I find seems to lead me in a different direction. 我正在寻找开发一个java REST Web服务来处理我正在开发的我的Android应用程序,我一直在努力寻找托管服务的最佳选择,我找到的所有东西似乎都引导我朝不同的方向发展。
Can anyone give me advice on what the best way to host a java REST web service would be? 谁能给我建议什么是主机java REST Web服务的最佳方式? I can do linux or windows and am relatively familiar with the lamp stack and IIS.
我可以做linux或windows,我对灯堆和IIS比较熟悉。
Thank you 谢谢
I would suggest looking at the Google App Engine for hosting, and writing the service in Java. 我建议查看Google App Engine进行托管,并用Java编写服务。 I just set up a few services that way for an app I'm working on and it was fast and easy, and currently it's free of charge for a very generous limited usage.
我只是为我正在开发的应用程序设置了一些服务,它既快速又简单,而且目前它是免费的,用于非常慷慨的有限使用。
So if you are familiar with the lamp stack why not using php for the REST service? 所以,如果您熟悉灯堆,为什么不使用PHP进行REST服务呢? Check out zend's REST implementation .
查看zend的REST实现 。
Exposing REST type access to resources persisted as JPA entities is very straightforward with Play! framework
随着JPA实体公开对REST资源的REST类型访问非常简单
Play! framework
Play! framework
: Play! framework
:
Hosting: Heroku
( http://www.heroku.com ) supports Java as a language (as well as Ruby, Node.js, Clojure, Python, and Scala), and Play!
托管:
Heroku
( http://www.heroku.com )支持Java作为一种语言(以及Ruby,Node.js,Clojure,Python和Scala)和Play!
as a framework, making it a good candidate in case you are going the Play! 作为一个框架,使它成为一个很好的候选人,以防你去玩! route;-) ... though obviously not the only use case.
路线;-) ......虽然显然不是唯一的用例。
Development life-cycle: This overview and this tutorial should give you a pretty good feel of the development life-cycle with git and Heroku
+ Play
; 开发生命周期: 本概述和本教程应该让您对git和
Heroku
+ Play
的开发生命周期有一个很好的感觉; if coming from "regular" Java tooling type of environments, you may find this approach refreshing. 如果来自“常规”Java工具类型的环境,您可能会发现这种方法更新。
IDE integration: Play!
IDE集成:
Play!
has plugins for NetBeans, IntelliJ IDEA and Eclipse ( http://www.playframework.org/documentation/1.2/ide ) 有NetBeans 插件 ,IntelliJ IDEA和Eclipse( http://www.playframework.org/documentation/1.2/ide )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.