<dependencies> <dependency> <groupId>org.jooby</groupId> <artifactId>jooby</artifactId> <version>2.0.0</version> </dependency> </dependencies> import org.jooby.Jooby; import org.jooby.JoobyRunner; @RunWith(JoobyRunner.class) public class MyApp extends Jooby { } get("/api/users", () -> { }); post("/api/users", () -> { }); get("/api/users/:id", (req) -> { }); put("/api/users/:id", (req) -> { }); delete("/api/users/:id", (req) -> { }); get("/api/users/:id", (req) -> { return user; }); public static void main(String[] args) { run(MyApp.class, args); }


上一篇:
下一篇:
切换中文