Gradle
implementation 'io.github.sparkjavateam:spark-core:2.9.4'
Maven
<dependency>
<groupId>io.github.sparkjavateam</groupId>
<artifactId>spark-core</artifactId>
<version>2.9.4</version>
</dependency>
import static spark.Spark.*;
public class HelloWorld {
public static void main(String[] arg) {
get("/hello", (request, response) -> "Hello World!");
}
}
View at: http://localhost:4567/hello