mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-06-18 21:39:45 +02:00
added webservice
This commit is contained in:
@@ -47,8 +47,14 @@ import sonia.scm.util.Util;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import com.sun.jersey.api.core.PackagesResourceConfig;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.JAXB;
|
||||
|
||||
/**
|
||||
@@ -70,6 +76,9 @@ public class ScmBackendModule extends ServletModule
|
||||
/** Field description */
|
||||
public static final String FILE_CONFIG = "config.xml";
|
||||
|
||||
/** Field description */
|
||||
public static final String PATTERN_API = "/api/*";
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
|
||||
/**
|
||||
@@ -104,6 +113,12 @@ public class ScmBackendModule extends ServletModule
|
||||
bind(PluginBackend.class).to(DefaultPluginBackend.class);
|
||||
bind(PluginScannerFactory.class).to(DefaultPluginScannerFactory.class);
|
||||
bind(PluginScannerScheduler.class).to(TimerPluginScannerScheduler.class);
|
||||
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
|
||||
params.put(PackagesResourceConfig.PROPERTY_PACKAGES,
|
||||
"sonia.scm.plugin.rest");
|
||||
serve(PATTERN_API).with(GuiceContainer.class, params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user