TTPOD RESTHTTP JSON API框架
CoC 理念的一套HTTP JSON API框架,基于SpringMVC 和 Groovy,内置了 MongoDB CRUD模版(JSON和MongoDB天然好基友)!!
比较适合开发 JSON RPC 接口!
Write Your Controller In Groovy
@Rest
class MyController extends ControllerSupport7 {
def hello(HttpServletRequest req) {
[code: 1, data: "Hello, ${req['name']} !"]
}
}
Open http://localhost:8080/my/hello?name=World
{"code":1,"data":"Hello, World !"}
That's ALL !!!
评论
