模块 org.redkale

类 HttpScope


  • public class HttpScope
    extends Object
    HTTP输出引擎的对象域
    输出引擎的核心类, 业务开发人员只有通过本类对象才能调用到输出引擎功能。

    HttpServlet调用:

        @HttpMapping(url = "/hello.html", auth = false)
        public void hello(HttpRequest req, HttpResponse resp) throws IOException {
            resp.finish(HttpScope.refer("/hello.html").attr("content", "哈哈"));
        }
     

    RestService调用:

        @RestMapping(name = "hello.html", auth = false)
        public HttpScope hello() {
           return HttpScope.refer("hello.html").attr("content", "哈哈");
        }
     
    详情见: https://redkale.org
    作者:
    zhangjx