A lightweight REST API library
Javalin is a true microframework with only one required dependency: SLF4J (logging).
By default Javalin also depends on Jetty, but you can exclude it (or use the javalin-without-jetty
artifact)
if you want to use a different Webserver (like Tomcat, etc).
Javalin also has plugins for JSON mapping, template rendering, and OpenAPI (Swagger), but they’re optional dependencies that you have to add manually.
Download Javalin
- Maven
- Gradle
- SBT
- Grape
- Leiningen
- Buildr
- Ivy
<dependency>
<groupId>io.javalin</groupId>
<artifactId>javalin</artifactId>
<version>5.6.3</version>
</dependency>
Not familiar with Maven? Read our Maven tutorial.
implementation("io.javalin:javalin:5.6.3")
Not familiar with Gradle? Read our Gradle tutorial.
libraryDependencies += "io.javalin" % "javalin" % "5.6.3"
@Grab(group='io.javalin', module='javalin', version='5.6.3')
[io.javalin/javalin "5.6.3"]
'io.javalin:javalin:jar:5.6.3'
<dependency org="io.javalin" name="javalin" rev="5.6.3" />
If you want Javalin with testing tools, Jackson and Logback,
you can use the artifact id javalin-bundle
instead of javalin
.
Javalin modules
There are multiple modules available for Javalin.
All modules are released in sync with the core javalin
module, you just have to replace
the artifact id:
javalin
- the core Javalin dependency (shown in the snippet above)javalin-bundle
-javalin
, plusjavalin-openapi
,jackson
andlogback
(good to get started fast)javalin-openapi
- the OpenAPI plugin and all required dependenciesjavalin-graphql
- the new GraphQL pluginjavalin-without-jetty
-javalin
with alljetty
dependencies excluded and Jetty specific methods removed (useful for running on e.g. Tomcat)
Manual downloads
You can get the prebuilt jar from Maven Central.
You can get the source on GitHub, or download it as a zip.