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 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. See the plugins page for more information.

Download Javalin

<dependency>
    <groupId>io.javalin</groupId>
    <artifactId>javalin</artifactId>
    <version>7.2.0</version>
</dependency>

Not familiar with Maven? Read our Maven tutorial.

implementation("io.javalin:javalin:7.2.0")

Not familiar with Gradle? Read our Gradle tutorial.

libraryDependencies += "io.javalin" % "javalin" % "7.2.0"
@Grab(group='io.javalin', module='javalin', version='7.2.0')
[io.javalin/javalin "7.2.0"]
'io.javalin:javalin:jar:7.2.0'
<dependency org="io.javalin" name="javalin" rev="7.2.0" />

If you want Javalin with testing tools, Jackson and Logback, you can use the artifact id javalin-bundle instead of javalin.

Javalin modules

Javalin is published as a small core artifact with a set of optional satellite modules. Add only the ones you need. All modules track the same version as the javalin core artifact.

javalin the core framework
javalin-bundle javalin + Jackson, Logback and test tools, in one dependency
javalin-bom Bill of Materials β€” pins a single version across all modules (see below)
javalin-micrometer Micrometer metrics integration
javalin-ssl SSL/TLS helper plugin
javalin-testtools JavalinTest and helpers for integration testing
javalin-rendering-{engine} template rendering β€” see /plugins/rendering

You can also browse every published artifact on Maven Central.

BOM (Bill of Materials)

The javalin-bom module lets you declare the Javalin version in one place and have every io.javalin:* artifact (core, rendering engines, micrometer, ssl, …) resolve to the same version automatically. Import it once, then depend on any Javalin module without repeating its version.

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.javalin</groupId>
            <artifactId>javalin-bom</artifactId>
            <version>7.2.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
dependencies {
    implementation(platform("io.javalin:javalin-bom:7.2.0"))

    // Javalin modules can now be declared without a version:
    implementation("io.javalin:javalin")
    implementation("io.javalin:javalin-rendering-jte")
}

Manual downloads

You can get prebuilt jars from Maven Central.
You can get the source on GitHub, or download it as a zip.

Like Javalin?
Star us 😊