in services/minho-rest/src/main/java/org/apache/karaf/minho/rest/jersey/JerseyRestService.java [48:73]
public void onRegister(ServiceRegistry serviceRegistry) throws Exception {
ConfigService config = serviceRegistry.get(ConfigService.class);
if (config == null) {
log.warning("ConfigService is not found in the service registry");
}
// get jetty service from the registry
JettyWebContainerService webContainerService = serviceRegistry.get(JettyWebContainerService.class);
if (webContainerService == null) {
throw new IllegalStateException("minho-http-service is not found in the service registry");
}
restPath = (config != null && config.getProperty(REST_PATH) != null) ? config.getProperty(REST_PATH) : "/rest/*";
if (config != null && config.getProperty(REST_PACKAGES) != null) {
restPackages = config.getProperty(REST_PACKAGES);
} else {
restPackages = "org.apache.karaf.minho";
}
log.info("Starting minho-rest-service");
log.info("\tpath: " + restPath);
log.info("\tpackages: " + restPackages);
ServletHolder servletHolder = webContainerService.addServlet(ServletContainer.class, restPath);
servletHolder.setInitOrder(1);
servletHolder.setInitParameter("jersey.config.server.provider.packages", restPackages);
}