Iam implementing Dropwizard client in a Dropwizard REST Application. I am following their User Manual.
While trying to register the client to jersey environment but cannot find the class ExternalServiceResource
@Override
public void run(ExampleConfiguration config,
Environment environment) {
final HttpClient httpClient = new HttpClientBuilder(environment).using(config.getHttpClientConfiguration())
.build();
environment.jersey().register(new ExternalServiceResource(httpClient));
}
I think that ExternalServiceResource was an example but it would look like:
You can put whatever name you want. The only requirement to create a resource is the @Path annotation, that you must put at class level, and some methods @GET, @POST...