Skip to content

Commit d5d5229

Browse files
committed
Update README
1 parent 95b01f2 commit d5d5229

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
1-
# javalin-generator
2-
Java annotation processor for generating web route to Controller adapters
1+
# avaje-http
2+
3+
Http server and client libraries and code generation.
4+
5+
## http server
6+
7+
A jax-rs style controllers with annotations (`@Path`, `@Get` ...)
8+
that is lightweight by using source code generation (annotation processors)
9+
to generate adapter code for Javalin and Helidon SE.
10+
11+
- Lightweight as in 65Kb library + generated source code
12+
- Full use of Javalin or Helidon SE as desired
13+
314

415
## Define a Controller
516
```java
617
package org.example.hello
718

8-
import io.dinject.controller.Controller
9-
import io.dinject.controller.Get
10-
import io.dinject.controller.Path
19+
import io.avaje.http.api.Controller
20+
import io.avaje.http.api.Get
21+
import io.avaje.http.api.Path
1122

1223
@Path("/widgets")
1324
@Controller
@@ -45,7 +56,7 @@ fun main(args: Array<String>) {
4556

4657
// get all the webRoutes
4758
val webRoutes = SystemContext.getBeans(WebRoutes::class.java)
48-
59+
4960
val javalin = Javalin.create()
5061

5162
javalin.routes {
@@ -71,14 +82,14 @@ fun main(args: Array<String>) {
7182
```java
7283
package org.example.hello;
7384

74-
import static io.dinject.controller.PathTypeConversion.*;
75-
import io.dinject.controller.WebRoutes;
85+
import static io.avaje.http.api.PathTypeConversion.*;
86+
import io.avaje.http.api.WebRoutes;
7687
import io.javalin.apibuilder.ApiBuilder;
7788
import javax.annotation.Generated;
7889
import javax.inject.Singleton;
7990
import org.example.hello.WidgetController;
8091

81-
@Generated("io.dinject.web.javlin")
92+
@Generated("io.avaje.javalin-generator")
8293
@Singleton
8394
public class WidgetController$route implements WebRoutes {
8495

0 commit comments

Comments
 (0)