All Downloads are FREE. Search and download functionalities are using the official Maven repository.

restx.server.JettyServerModule Maven / Gradle / Ivy

There is a newer version: 1.2.0-rc2
Show newest version
package restx.server;

import com.google.common.base.Charsets;
import com.google.common.hash.Hashing;
import restx.factory.Module;
import restx.factory.Provides;

import javax.inject.Named;

/**
 * @author fcamblor
 */
@Module(priority = 1000)
public class JettyServerModule {
    @Provides
    @Named("restx.server.jetty.webxml.default.location")
    public String restxServerJettyWebXmlDefaultLocation(@Named("restx.server.jetty.appbase.default.location") String appBase) {
        return appBase+"/WEB-INF/web.xml";
    }


    @Provides
    @Named("restx.server.jetty.appbase.default.location")
    public String restxServerJettyAppBaseDefaultLocation() {
        return "src/main/webapp";
    }

    @Provides
    @Named("restx.server.jetty")
    public WebServerSupplier jettyWebServerSupplier(
            @Named("restx.server.jetty.appbase.default.location") String appBase,
            @Named("restx.server.jetty.webxml.default.location") String webxml){
        return JettyWebServer.jettyWebServerSupplier(webxml, appBase);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy