I'm trying to get this package to work and I got all the way to end of the README. However, when I visit my /admin/test endpoint I get a 404 not found error. From my perspective everything should be working since I can see in my logs that my custom resource was sucessfully registered on the test endpoint. Any ideas?


My custom resource:
package com.example.resources;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@Path("/test")
public class AdminResource {
@GET
public String helloWorld() {
return "Hello world!";
}
}
My main class:
package com.example.app;
import com.github.mtakaki.dropwizard.admin.AdminResourceBundle;
import com.example.resources.AdminResource;
import com.example.configuration.AppServiceConfiguration;
import io.dropwizard.jersey.jackson.JacksonBinder;
import io.dropwizard.jersey.setup.JerseyEnvironment;
import io.dropwizard.setup.Environment;
public class IntegrationServiceApplication extends Application<AppServiceConfiguration> {
private final AdminResourceBundle adminResourceBundle = new AdminResourceBundle();
public static void main(final String[] args) throws Exception {
new IntegrationServiceApplication().run(args);
}
@Override
public String getName() {
return "AppService";
}
@Override
public void initialize(final Bootstrap<AppServiceConfiguration> bootstrap) {
bootstrap.addBundle(adminResourceBundle);
}
@Override
public void run(final IntegrationServiceConfiguration configuration,
final Environment environment) {
//region AdminResource Setup
final JerseyEnvironment adminJerseyEnvironment = this.adminResourceBundle
.getJerseyEnvironment();
//endregion
//region API Resources
final AdminResource adminResource = new AdminResource();
//endregion
//region Jersey Registration
adminJerseyEnvironment.register(adminResource);
//endregion
}
}
This is on dropwizard@1.3.8, btw.
I'm trying to get this package to work and I got all the way to end of the README. However, when I visit my
/admin/testendpoint I get a 404 not found error. From my perspective everything should be working since I can see in my logs that my custom resource was sucessfully registered on thetestendpoint. Any ideas?My custom resource:
My main class:
This is on dropwizard@1.3.8, btw.