Switching to ResourceConfig
This commit is contained in:
parent
2930a89ee7
commit
254b2f6722
|
@ -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.resourcemanagement.rest</param-value>
|
||||
</init-param>
|
||||
<servlet-name>org.gcube.resourcemanagement.RMInitializer</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.resourcemanagement.RMInitializer</servlet-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
</web-app>
|
|
@ -0,0 +1,20 @@
|
|||
package org.gcube.resourcemanagement;
|
||||
|
||||
import javax.ws.rs.ApplicationPath;
|
||||
|
||||
import org.gcube.resourcemanagement.rest.BaseREST;
|
||||
import org.gcube.smartgears.annotations.ManagedBy;
|
||||
import org.glassfish.jersey.server.ResourceConfig;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
@ApplicationPath("/")
|
||||
@ManagedBy(ResourceManager.class)
|
||||
public class RMInitializer extends ResourceConfig {
|
||||
|
||||
public RMInitializer() {
|
||||
packages(BaseREST.class.getPackage().toString());
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue