TTPOD RESTHTTP JSON API框架

联合创作 · 2023-09-21 20:54

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 !!!

浏览 5
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报