Spark (software)
For the data processing framework, see Apache Spark.
Original author(s) | Per Wendel |
---|---|
Stable release | 2.1 / 8 December 2014 |
Written in | Java |
Operating system | Cross-platform (Java Virtual Machine) |
Type | Web application framework |
License | Apache License 2.0 |
Website |
sparkjava |
Spark is a free and open source software web application framework and domain-specific language written in Java. It is an alternative to other Java web application frameworks such as JAX-RS, Play framework and Spring MVC. It runs on an embedded Jetty web server by default, but can be configured to run on other webservers.
Inspired by Sinatra, it does not follow the model–view–controller pattern used in other frameworks, such as Spring MVC. Instead, Spark is intended for "quickly creating web-applications in Java with minimal effort."[1]
Spark was created and open-sourced in 2011 by Per Wendel.
Example (Hello World)
import static spark.Spark.*; public class HelloWorld { public static void main(String[] args) { get("/hello", (request, response) -> "Hello World!"); } }