Important: This news article covers an old version of Javalin (v3.4.1).
The current version is v6.3.0.
See the documentation page for up-to-date information.
See the documentation page for up-to-date information.
RouteOverviewPlugin JSON
The RouteOverviewPlugin
has been with Javalin since version 1.5.0.
It’s a plugin which listens for routeAdded
events and creates a HTML page displaying all the mapped routes:
As of 3.4.1, this will be served as a JSON object if the client accepts json.
You can enable the RouteOverviewPlugin
like this:
Javalin.create(config ->
config.registerPlugin(new RouteOverviewPlugin(path)); // show all routes on specified path
config.registerPlugin(new RouteOverviewPlugin(path, roles)); // show all routes on specified path (with auth)
)
Thanks to @dherges for adding this feature.
Fixes
- We’re now using the newly created Jvm-Brotli instead of jBrotli (thanks to @nixxcode).
- The
JavalinVue
plugin now always uses UTF-8 for reading files. This fixes a bug when running on distroless docker images (or any OS which doesn’t use UTF-8 by default). - The
JavalinVue#stateFunction
is now a@JvmField
. - If an
EofException
occurs inJavalinServlet
orJettyResourceHandler
it’s no longer logged. These exceptions occur if the client closes a connection before the response has been fully written (which is fine). - The
WsContext
class now hasqueryParam(key: String)
(thanks to @bluedevil2k).