Source:
public void run(PublicApiConfig configuration, Environment environment) { initialiseSSLSocketFactory(); final Injector injector = Guice.createInjector(new PublicApiModule(configuration, environment)); environment.healthChecks().register("ping", new Ping()); environment.jersey().register(injector.getInstance(HealthCheckResource.class)); environment.jersey().register(injector.getInstance(PaymentsResource.class)); environment.jersey().register(injector.getInstance(DirectDebitEventsResource.class)); environment.jersey().register(injector.getInstance(PaymentRefundsResource.class)); environment.jersey().register(injector.getInstance(RequestDeniedResource.class)); environment.jersey().register(injector.getInstance(MandatesResource.class)); environment.jersey().register(injector.getInstance(SearchRefundsResource.class)); environment.jersey().register(injector.getInstance(DirectDebitPaymentsResource.class)); environment.jersey().register(injector.getInstance(TransactionsResource.class)); environment.jersey().register(injector.getInstance(TelephonePaymentNotificationResource.class)); environment.jersey().register(new InjectingValidationFeature(injector)); environment.jersey().register(environment.getValidator()); environment.servlets().addFilter("AuthorizationValidationFilter", injector.getInstance(AuthorizationValidationFilter.class)) .addMappingForUrlPatterns(of(REQUEST), true, "/v1 environment.jersey().property(CommonProperties.FEATURE_AUTO_DISCOVERY_DISABLE, Boolean.TRUE); CachingAuthenticator<String, Account> cachingAuthenticator = new CachingAuthenticator( environment.metrics(), injector.getInstance(AccountAuthenticator.class), configuration.getAuthenticationCachePolicy()); environment.jersey().register(new AuthDynamicFeature( new OAuthCredentialAuthFilter.Builder<Account>() .setAuthenticator(cachingAuthenticator) .setPrefix("Bearer") .buildAuthFilter())); environment.jersey().register(new AuthValueFactoryProvider.Binder<>(Account.class)); attachExceptionMappersTo(environment.jersey()); initialiseMetrics(configuration, environment); environment.healthChecks().unregister("redis"); }

Target:
public void run(PublicApiConfig configuration, Environment environment) { initialiseSSLSocketFactory(); final Injector injector = Guice.createInjector(new PublicApiModule(configuration, environment)); environment.healthChecks().register("ping", new Ping()); environment.jersey().register(injector.getInstance(HealthCheckResource.class)); environment.jersey().register(injector.getInstance(PaymentsResource.class)); environment.jersey().register(injector.getInstance(DirectDebitEventsResource.class)); environment.jersey().register(injector.getInstance(PaymentRefundsResource.class)); environment.jersey().register(injector.getInstance(RequestDeniedResource.class)); environment.jersey().register(injector.getInstance(MandatesResource.class)); environment.jersey().register(injector.getInstance(SearchRefundsResource.class)); environment.jersey().register(injector.getInstance(DirectDebitPaymentsResource.class)); environment.jersey().register(injector.getInstance(TransactionsResource.class)); environment.jersey().register(injector.getInstance(TelephonePaymentNotificationResource.class)); environment.jersey().register(new InjectingValidationFeature(injector)); environment.jersey().register(injector.getInstance(RateLimiterFilter.class)); environment.servlets().addFilter("AuthorizationValidationFilter", injector.getInstance(AuthorizationValidationFilter.class)) .addMappingForUrlPatterns(of(REQUEST), true, "/v1 environment.jersey().property(CommonProperties.FEATURE_AUTO_DISCOVERY_DISABLE, Boolean.TRUE); CachingAuthenticator<String, Account> cachingAuthenticator = new CachingAuthenticator( environment.metrics(), injector.getInstance(AccountAuthenticator.class), configuration.getAuthenticationCachePolicy()); environment.jersey().register(new AuthDynamicFeature( new OAuthCredentialAuthFilter.Builder<Account>() .setAuthenticator(cachingAuthenticator) .setPrefix("Bearer") .buildAuthFilter())); environment.jersey().register(new AuthValueFactoryProvider.Binder<>(Account.class)); attachExceptionMappersTo(environment.jersey()); initialiseMetrics(configuration, environment); environment.healthChecks().unregister("redis"); }