Skip to content
This repository was archived by the owner on Aug 2, 2023. It is now read-only.

Latest commit

 

History

History
25 lines (19 loc) · 1.11 KB

File metadata and controls

25 lines (19 loc) · 1.11 KB

Registering a WavefrontJerseyFilter with Dropwizard

After you create a WavefrontJerseyFilter (using quickstart steps or custom steps), you must register it with your application's Dropwizard environment.

To register a WavefrontJerseyFilter in a Dropwizard application:

public class MyApplication extends Application<MyConfiguration>{
    @Override
    public void run(MyApplicationConfiguration configuration, Environment environment) {
        ...
        ...
        // Create the filter 
        WavefrontJerseyFilter wfJerseyFilter = buildJerseyFilter();  // pseudocode

        // Register the filter with Dropwizard Jersey environment
        environment.jersey().register(wfJerseyFilter);
        ...
        ...
    }
}

See the Dropwizard documentation for further details on Jersey filters.