Skip to content

Commit 1162d32

Browse files
committed
Fix #40
1 parent 3334f2e commit 1162d32

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

_posts/2015-03-17-controller.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public class ControllerDemo {
3535

3636
public static void main(String[] args) {
3737
Pippo pippo = new Pippo();
38-
pippo.getApplication().GET("/", ContactsController.class, "index");
39-
pippo.getApplication().GET("/contact/{id}", ContactsController.class, "getContact");
38+
pippo.GET("/", ContactsController.class, "index");
39+
pippo.GET("/contact/{id}", ContactsController.class, "getContact");
4040
pippo.start();
4141
}
4242

_posts/2015-03-17-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class HelloWorld {
1919

2020
public static void main(String[] args) {
2121
Pippo pippo = new Pippo();
22-
pippo.getApplication().GET("/", (routeContext) -> routeContext.send("Hello World!"));
22+
pippo.GET("/", (routeContext) -> routeContext.send("Hello World!"));
2323
pippo.start();
2424
}
2525

_posts/2015-03-17-static-files.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ For example:
1919

2020
```java
2121
Pippo pippo = new Pippo();
22-
pippo.getApplication().addPublicResourceRoute();
23-
pippo.getApplication().addWebjarsResourceRoute();
22+
pippo.addPublicResourceRoute();
23+
pippo.addWebjarsResourceRoute();
2424
```
2525

2626
or more verbose:
2727

2828
```java
2929
Pippo pippo = new Pippo();
30-
pippo.getApplication().addResourceRoute(new PublicResourceHandler());
31-
pippo.getApplication().addResourceRoute(new WebjarsResourceHandler());
30+
pippo.addResourceRoute(new PublicResourceHandler());
31+
pippo.addResourceRoute(new WebjarsResourceHandler());
3232
```
3333

3434
You can use multiple `FileResourceRoute` but it is nonsense to use more `PublicResourceRoute` or more `WebjarsResourceRoute`.
@@ -97,7 +97,7 @@ If you want to serve static files that are not on the classpath then you may use
9797
```java
9898
Pippo pippo = new Pippo();
9999
// make available some files from a local folder (try a request like 'src/main/resources/simplelogger.properties')
100-
pippo.getApplication().addFileResourceRoute("/src", "src");
100+
pippo.addFileResourceRoute("/src", "src");
101101
```
102102

103103
For security reasons, the `FileResourceRoute` doesn't serve resources from outside its base directory by using relative paths such as `../../../private.txt`.

_posts/2015-03-17-under-the-hood.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public class MyDemo {
144144
Pippo pippo = new Pippo();
145145

146146
// add routes
147-
pippo.getApplication().GET("/", (routeContext) -> routeContext.send("Hello World"));
147+
pippo.GET("/", (routeContext) -> routeContext.send("Hello World"));
148148

149149
// start the embedded server
150150
pippo.start();

_posts/2015-03-20-hello-world.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class HelloWorld {
1313

1414
public static void main(String[] args) {
1515
Pippo pippo = new Pippo();
16-
pippo.getApplication().GET("/", (routeContext) -> routeContext.send("Hello World!"));
16+
pippo.GET("/", (routeContext) -> routeContext.send("Hello World!"));
1717
pippo.start();
1818
}
1919

0 commit comments

Comments
 (0)