Important: This news article covers an old version of Javalin (v3.13.0).
The current version is v6.4.0.
See the documentation page for up-to-date information.
See the documentation page for up-to-date information.
Plugin improvements
- You can now host multiple OpenAPI specs from the same Javalin app (thanks to sauterl)
- You can now specify a “base” model for template engines (thanks to TareqK)
- JavalinVue now automatically HTML decodes URL parameters (thanks to otron)
- Micrometer now correctly tracks Jetty connections (thanks to gi-wg2)
Splats
After a lot of back and forth, Splats have returned (thanks to oharaandrew314):
Handler-paths can include wildcard parameters (splats). These are available via Context.splat()
- Java
- Kotlin
app.get("/hello/*/and/*", ctx -> {
ctx.result("Hello: " + ctx.splat(0) + " and " + ctx.splat(1));
});
app.get("/hello/*/and/*") { ctx ->
ctx.result("Hello: " + ctx.splat(0) + " and " + ctx.splat(1))
}