This should probably be posted on the MongoDB class forum, but I ran into a similar problem. The getter method seems to have changed from the moment the course material was prepared. Now you need a path and route to get
get (path, route)
import spark.Request;
import spark.Response;
import spark.Route;
import spark.Spark;
public class HelloWorldSparkStyle {
public static void main(String[] args){
Spark.get("/", new Route() {
public Object handle(final Request request, final Response response){
return "Hello World from Spark";
}
});
}
}
source
share