Javalin 3.0 brings a complete rework for WebSockets and event-setup

Share
  • June 13, 2019

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.

The updates

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:

  • WsContext has been introduced
  • wsBefore / wsAfter / wsException have been introduced
  • AccessManager can 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 Javalin class to JavalinConfig, which is an argument to app.create()
  • Validation has been improved and simplified
  • Extension has been renamed to Plugin and has been reworked
  • Standalone mode (running without Jetty) has been improved
  • A very small Vue (JavaScript frontend library) integration has been added
  • 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.

SEE ALSO: Cthulhu: New open source chaos engineering tool for Java

Getting started

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.

The post Javalin 3.0 brings a complete rework for WebSockets and event-setup appeared first on JAXenter.

Source : JAXenter