Javalin 3.0 brings a complete rework for WebSockets and event-setup
Keeping up with its fast release cycle, Javalin, the lightweight web framework for Kotlin and Java, is back with a new update. Javalin 3.0 brings a complete rework for WebSockets and event-setup. Let’s take a closer look.
Javalin, the lightweight web framework for both Kotlin and Java developers comes back with a new release.
Javalin 3.0 brings some major changes including a complete rework for WebSockets and event-setup.
Let’s have a look at the most interesting highlights.
According to the official blog post, Javalin 3.0 features ~6000 additions and ~2500 deletions.
Here are some of the major changes:
OpenAPI plugin – A much-requested feature is the support for OpenAPI (Swagger).
WebSockets – WebSockets have been completely reworked. More specifically:
WsContexthas been introduced
wsExceptionhave been introduced
AccessManagercan now handle WebSocket upgrade requests
Event-setup – Event-setup has been completely reworked, and more events have been added.
Other important improvements include:
- Configuration has been moved from the
JavalinConfig, which is an argument to
- Validation has been improved and simplified
Extensionhas been renamed to
Pluginand has been reworked
- Standalone mode (running without Jetty) has been improved
- The internals have been completely refactored to make development easier
- A lot of new config options have been added
Head over to the official release announcement for more details on the latest release.
If you are eager to upgrade to Javalin 3.0, you should keep in mind that, as mentioned earlier, the changes in the configuration setup is one of the biggest new things in the latest release.
Make sure to check out the full list of the config options here.
You can also find the full migration guide here.