8000 Add get/hello route · taywils/java_spark_tutorial@cdbf62e · GitHub
[go: up one dir, main page]

Skip to content

Commit cdbf62e

Browse files
committed
Add get/hello route
1 parent 256ce2b commit cdbf62e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/main/java/HelloSpark.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1+
import static spark.Spark.*;
2+
import spark.*;
3+
14
public class HelloSpark {
25
public static void main(String[] args) {
3-
System.out.println("Hello World!");
6+
get(new Route("/hello") {
7+
@Override
8+
public Object handle(Request request, Response response) {
9+
return "Hello Spark MVC Framework!";
10+
}
11+
});
412
}
513
}

0 commit comments

Comments
 (0)
0