Dropwizard 0.7.1 to 0.8.5 does not log sub-resource paths in the console on application startup

39 views
Skip to first unread message

Raf Fareen

unread,
Apr 6, 2020, 3:46:59 PM4/6/20
to dropwizard-dev
Hi guys, 

I am upgrading an application from Dropwizard 0.7.1 to 0.8.5 and came to a behavior change whereby Dropwizard 0.7.1 logs all paths including sub-resource in the console on startup and Dropwizard 0.8.5 does not log the sub-resource paths.

Here is a sample Dropwizard app https://github.com/rhamedy/dropwizard-sample-app (change the dropwizard-core version to 0.7.1 and 0.8.5 to see the diff)

TL;DR 

I have 3 endpoints and 2 of them are sub-resources. When using Dropwizard 0.7.1, when running the application the output prints the following 

INFO  [2020-04-06 18:20:27,364] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources:

    GET     /api/manager (test.dropwizard.resources.HelloResource)
    GET     /api/manager/greetings (test.dropwizard.resources.HelloSubResource)
    GET     /api/manager/greetings/{greetingId}/sub-greetings (test.dropwizard.resources.HelloSubResource)

Correctly listing all the endpoints/paths. 

When upgrading to Dropwizard 0.8.5 the output looks as follow 

INFO  [2020-04-06 18:23:22,347] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources:

    GET     /api/manager (test.dropwizard.resources.HelloResource)

Only showing the endpoint/path where the class has `@Path` annotation on it, not printing the sub-resource paths just like 0.7.1. 

Is this a known issue? Or I am missing some configuration? 

I have a workaround for it (please see the README.md) https://github.com/rhamedy/dropwizard-sample-app but, before I proceed with the workaround I wanted to double-check with the community.

Cheers, 
Raf.
Dropwizard-0.7.1-version.png
Dropwizard-0.8.5-version.png

Friso Vrolijken

unread,
Apr 7, 2020, 8:16:17 AM4/7/20
to dropwizard-dev
Just curious (don't have an answer for you, sorry): why are you upgrading to an old version of Dropwizard? Why not latest greatest?


Raf Hamedy

unread,
Apr 7, 2020, 9:53:06 AM4/7/20
to dropwizard-dev
The ultimate goal is the latest version. Taking into account the nature of our application, it's a little too risky to go straight to the latest from 0.7.x. We believe that frequent migration of 1 major version at a time is much safer.

The sample app is to demonstrate the issue, not the real application I am migrating.
Reply all
Reply to author
Forward
0 new messages