- Easy to create RESTful API, Web API, etc
- Runs on servlet containers
- Supports embedded Jetty (Optional)
- Minimal dependencies (Only Servlet API)
<dependency>
<groupId>com.github.mamorum</groupId>
<artifactId>kaze</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.4.6.v20170531</version>
</dependency>
package kaze.sample.gs.html;
import kaze.App;
import kaze.opt.Jetty;
// app -> http://localhost:8080/app/hello
// doc -> http://localhost:8080/*
public class Main {
public static void main(String[] args) {
App app = new App();
app.get("/hello", (req, res) -> {
res.html("<p>Hello, World.</p>");
});
Jetty.app(app, "/app/*");
Jetty.doc("/public", "/");
Jetty.listen(8080);
}
}
gs> mvn compile
gs> mvn exec:java -Dexec.mainClass=kaze.sample.gs.html.Main
> curl -s -X GET http://localhost:8080/app/hello
<p>Hello, World.</p>
- gs: basic examples (above and json response).
- rdb: web app accessing relational database, packaged as fatjar.
- war: web app for servlet container, packaged as war.
- Java 8
- Servlet 3.1
- Jetty 9.4.6 (Optional)
And compatible higher versions.