Search in sources :

Example 1 with MyApplication

use of org.glassfish.jersey.examples.extendedwadl.resources.MyApplication in project jersey by jersey.

the class ExtendedWadlWebappTest method configureDeployment.

@Override
protected DeploymentContext configureDeployment() {
    final ResourceConfig resourceConfig = new ResourceConfig(new MyApplication().getClasses());
    resourceConfig.property(ServerProperties.WADL_GENERATOR_CONFIG, "org.glassfish.jersey.examples.extendedwadl" + ".SampleWadlGeneratorConfig");
    final Resource.Builder resourceBuilder = Resource.builder();
    resourceBuilder.name("resource-programmatic").path("programmatic").addMethod("GET").handledBy(new ProgrammaticResource());
    resourceConfig.registerResources(resourceBuilder.build());
    return DeploymentContext.builder(resourceConfig).contextPath("extended-wadl-webapp").build();
}
Also used : Resource(org.glassfish.jersey.server.model.Resource) MyApplication(org.glassfish.jersey.examples.extendedwadl.resources.MyApplication) ResourceConfig(org.glassfish.jersey.server.ResourceConfig)

Example 2 with MyApplication

use of org.glassfish.jersey.examples.extendedwadl.resources.MyApplication in project jersey by jersey.

the class ExtendedWadlWebappOsgiTest method createResourceConfig.

private ResourceConfig createResourceConfig() {
    final ResourceConfig resourceConfig = new ResourceConfig(new MyApplication().getClasses());
    resourceConfig.property(ServerProperties.WADL_GENERATOR_CONFIG, SampleWadlGeneratorConfig.class.getName());
    return resourceConfig;
}
Also used : MyApplication(org.glassfish.jersey.examples.extendedwadl.resources.MyApplication) ResourceConfig(org.glassfish.jersey.server.ResourceConfig)

Aggregations

MyApplication (org.glassfish.jersey.examples.extendedwadl.resources.MyApplication)2 ResourceConfig (org.glassfish.jersey.server.ResourceConfig)2 Resource (org.glassfish.jersey.server.model.Resource)1