Fork me on GitHub

Javalin 1 to 2 migration guide

Package structure

Javalin 2 has some changes to the package structure:

Server customization/defaults

app.embeddedServer(new EmbeddedJettyFactory(() -> new Server())) // v1
app.server(() -> new Server()) // v2

WebSockets

It was possible to defined WebSockets using Jetty annotations in v1 of Javalin. These Jetty WebSockets have limited functionality compared to the Javalin lambda WebSockets, which is why they have been removed.

AccessManager

Context

Events

Misc

Do you like Javalin?