Giter Site home page Giter Site logo

route group about blade HOT 6 CLOSED

lets-blade avatar lets-blade commented on August 26, 2024
route group

from blade.

Comments (6)

daimajia avatar daimajia commented on August 26, 2024

Better using English to describe the title considering the foreign developers.

from blade.

hellokaton avatar hellokaton commented on August 26, 2024

我认同你的观点,但是个人英文水平有限,暂时没有人参与呢,都是国外开发者提的PR。。

from blade.

daimajia avatar daimajia commented on August 26, 2024

你可以用 iciba 或者有道词典 搜出你大概想表达的意思,不用追求什么语法 大致描述清楚就行,国外的开发者都能看懂。

from blade.

hellokaton avatar hellokaton commented on August 26, 2024

我会尽快写出英文的文档 😃 不对的地方应该会有人帮忙修改吧,谢谢daimajia支持。

from blade.

ScienJus avatar ScienJus commented on August 26, 2024

分组路由具体是指类似于下面的功能么?

public static void main(String[] args) {
    Blade blade = Blade.me();
    blade.group("/users", new RouteGroup() {
        @Override
        public void route() {
            get("", new RouteHandler() {
                @Override
                public void handle(Request req, Response res) {
                    res.html("get all users");
                }
            });

            get("/:id", new RouteHandler() {
                @Override
                public void handle(Request req, Response res) {
                    res.html("get id = " + req.param("id"));
                }
            });

            post("/:id", new RouteHandler() {
                @Override
                public void handle(Request req, Response res) {
                    res.html("post id = " + req.param("id"));
                }
            });
        }
    });
    blade.listen(9001).start();
}

from blade.

hellokaton avatar hellokaton commented on August 26, 2024

finished

from blade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.