Skip to content

Commit 3535f2e

Browse files
committed
little improvement
1 parent a9f192b commit 3535f2e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The easiest way of serving static files is to use:
1313
- [PublicResourceHandler]({{ site.coreurl }}/src/main/java/ro/pippo/core/route/PublicResourceHandler.java)
1414
- [WebjarsResourceHandler]({{ site.coreurl }}/src/main/java/ro/pippo/core/route/WebjarsResourceHandler.java)
1515
- [FileResourceHandler]({{ site.coreurl }}/src/main/java/ro/pippo/core/route/FileResourceHandler.java)
16+
- [ClasspathResourceHandler]({{ site.coreurl }}/src/main/java/ro/pippo/core/route/ClasspathResourceHandler.java)
1617

1718
For example:
1819

@@ -22,6 +23,8 @@ pippo.getApplication().GET(new PublicResourceHandler());
2223
pippo.getApplication().GET(new WebjarsResourceHandler());
2324
```
2425

26+
You can use multiple `FileResourceHandler` but it is nonsense to use more `PublicResourceHandler` or more `WebjarsResourceHandler`.
27+
2528
The [CrudNgDemo]({{ site.demourl }}/pippo-demo-crudng) (demo pippo-angularjs integration) is a good application that demonstrates the concept of static files.
2629
In `src/main/resources` we created a folder __public__ and we put all assets in that folder (imgs, css, js, fonts, ...).
2730

0 commit comments

Comments
 (0)