How will I configure jackson to use snake case in dropwizard instead of putting @JsonSnakeCase in every class ?
And finally am able to find the answer.. Just add below cofiguration.
environment.getObjectMapperFactory().setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES)
Just add this following line in your run() method
environment.getObjectMapper().setPropertyNamingStrategy(
PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With