Request and Response Filters in Dropwizard

When constructing a Dropwizard application, there may be some pre-processing or post-processing you’d like to do on Resource methods. It’s fairly easy to add request and response filters in Dropwizard through the implementation of ContainerRequestFilter, ContainerResponseFilter, and ResourceFilterFactory, and adding them to the environment.