Skip to content

Commit c3ed7ab

Browse files
committed
Router: add path operator
- Ability to pipe use(path, jooby) calls under common prefix fix jooby-project#866 - router: add path() operator fix jooby-project#897 - deprecates: router.use("/pattern") fix jooby-project#898 - [kotlin] deprecates: route method fix jooby-project#899
1 parent 4963173 commit c3ed7ab

File tree

19 files changed

+1162
-515
lines changed

19 files changed

+1162
-515
lines changed

doc/dynamic-routing.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,6 @@ If you load the application from `http://foo.com` the `foo-branding` route will
2727

2828
Dynamic routing is done over [route.name()]({{defdocs}}/Route.html#name--). From {{req_filter}} you provide a `name filter` via [chain.next(name, req, rsp)](/apidocs/org/jooby/Route.Chain.html#next-java.lang.String-org.jooby.Request-org.jooby.Response-) method.
2929

30-
You can group routes via [use(path)]({{defdocs}}/Jooby.html#use-java.lang.String-) method and globally set a name to all the child routes:
31-
32-
```java
33-
{
34-
use("/")
35-
.get(() -> Results.html("foo"))
36-
.get("/api", () -> ...)
37-
// apply name to all routes
38-
.name("foo-branding");
39-
40-
use("/")
41-
Results.html("bar")
42-
.get(() -> Results.html("bar"))
43-
.get("/api", () -> ...)
44-
// apply name to all routes
45-
.name("bar-branding");
46-
}
47-
```
48-
4930
Or group routes via [with(Runnable)]({{defdocs}}/Jooby.html#with-java.lang.Runnable-):
5031

5132
```java

0 commit comments

Comments
 (0)