4.0 discussion

Please write your feature requests on GitHub.

4.0.0.ALPHA0 (17th of February)

This version is very similar to 3.13.3 (the last 3x version).

There is one breaking change, which is the extraction of inline reified functions from Context and WsContext. These functions lead to non-deterministic behavior in Mockk and Mockito, which made it hard to write mock tests.

Jackson has been bumped to 2.12.1, which actually required bumping to Kotlin 1.4 too.

The HttpResponseException class now properly serializes the details map to an object, rather than an array of key/value pairs.

4.0.0.ALPHA1 (18th of April)

  • You can now validate empty strings in Validator
  • Content-Type can now be null for UploadedFile
  • WsHandler is now WsConfig
  • Context extensions (Context#register/Context#use) have been removed
  • JavalinVue now supports Vue3
  • Exceptions while writing responses in async mode are now handled gracefully
  • Can now set explicit “includes” in OpenAPI (ex: .includePath("/api")
  • Added option to log Jetty info during startup
  • Removed dependency on Jetty from OpenAPI plugin

4.0.0.ALPHA2 (26th of May)

  • A new module with test tools has been added (javalin-testtools) - see API in PR
  • A Loom ThreadPool (virtual threads) is now used by default (if runtime has Loom)
  • Kotlin has been bumped to 1.5.0, and tests now run against JDK 15
  • Static-files config has been reworked. All global config options have been removed, and it’s now possible to set headers per handler. The “immutable” folder convention has been removed
  • You can now consume a session attribute by passing a boolean (ctx.sessionAttribute(key = "key", consume = true))
  • JavalinVue’s configuration has been reworked, it’s no longer possible to set things in the wrong order
  • Added a JavalinLogger to easily enable/disable all of Javalin’s logging
  • GraphQL now supports operation names
  • The cookie(name, value) method will now set instead of add (meaning you can no longer end up with two cookies with the same name)
  • The included rate-limiter has been renamed to NaiveRateLimiter, to further underline its limits
  • The Javalin version is now logged on startup
  • Javalin#config has been renamed to Javalin#_conf to avoid people accidentally using it