Added ResourceInitializer
This commit is contained in:
parent
ef37e8fbea
commit
d5f0e646d0
|
@ -6,12 +6,7 @@
|
|||
<display-name>${project.name}</display-name>
|
||||
<description>${project.description}</description>
|
||||
<servlet>
|
||||
<servlet-name>service</servlet-name>
|
||||
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
|
||||
<init-param>
|
||||
<param-name>jersey.config.server.provider.packages</param-name>
|
||||
<param-value>org.gcube.service.helloworld.rest</param-value>
|
||||
</init-param>
|
||||
<servlet-name>org.gcube.service.helloworld.ResourceInitializer</servlet-name>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>default</servlet-name>
|
||||
|
@ -22,7 +17,7 @@
|
|||
<url-pattern>/api-docs/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>service</servlet-name>
|
||||
<servlet-name>org.gcube.service.helloworld.ResourceInitializer</servlet-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
</web-app>
|
|
@ -0,0 +1,20 @@
|
|||
package org.gcube.service.helloworld;
|
||||
|
||||
import javax.ws.rs.ApplicationPath;
|
||||
|
||||
import org.gcube.service.helloworld.rest.HelloService;
|
||||
import org.gcube.smartgears.annotations.ManagedBy;
|
||||
import org.glassfish.jersey.server.ResourceConfig;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
@ApplicationPath("/")
|
||||
@ManagedBy(HelloWorldManager.class)
|
||||
public class ResourceInitializer extends ResourceConfig {
|
||||
|
||||
public ResourceInitializer() {
|
||||
packages(HelloService.class.getPackage().toString());
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue