m.core
Microservices Framework
Browse documentation: Javadoc
Clone source: github.com/hackorama/mcore
Download jars: com.hackorama.m.core:mcore:0.1.0
Signed with PGP key: D791 8556 0576 7757 6235 6402 6C13 01F5 1B93 B750 mcore@hackorama.com
dependencies {
implementation 'com.hackorama.m.core:mcore:0.1.0'
}
new Service() {
private Response hello(Request request) {
if (request.getPathParams().containsKey("name")) {
return new Response("Hello " + request.getPathParams().get("name"));
}
return new Response("Hello world");
}
@Override
public void configure() {
GET("/hello", this::hello);
GET("/hello/{name}", this::hello);
}
}.configureUsing(new SparkServer("Hello")).start();