RESTful Webservices on Google App Engine

后端 未结 3 623
忘掉有多难
忘掉有多难 2021-01-01 05:21

First of all I need to say that I\'m not so experienced in Google App Engine.

I know that it is possible that we deploy RESTful Web-services (JERSEY) on GAE<

3条回答
  •  無奈伤痛
    2021-01-01 06:12

    I have tried Restlet and was not satisfied with it: it tries to do to much and is not JAX-RS at it's core (they have it as an add-on). I had problems make it work in various settings (request would not be routed to the method, but when only changing method order it would start working. WTF?!). Also their documentation is scarce and inconsistent.

    I took a look at Jersey: there were some problems with running on GAE at that time (resolved via help on support forum). Also I found their docs to not be that good.

    Finally, I went with Resteasy/Jackson: docs are superb, works with Maven out of the box, full control over config, security and error handling (exceptions thrown in code returned as JSON error object). Basically no issues. You can look at an example here: LeanEngine REST classes.

    Also, if used with JSON/Jackson (make sure to force Jackson 1.9, as built in 1.7 is old) you get a lot of control over how your classes are mapped to JSON: one-to-one, wrapping/embedding, adapter-pattern, etc..

提交回复
热议问题