use of com.sun.jersey.api.core.PackagesResourceConfig in project ribbon by Netflix.
the class NettyClientTest method init.
@BeforeClass
public static void init() throws Exception {
PackagesResourceConfig resourceConfig = new PackagesResourceConfig("com.netflix.ribbon.test.resources");
port = (new Random()).nextInt(1000) + 4000;
SERVICE_URI = "http://localhost:" + port + "/";
ExecutorService service = Executors.newFixedThreadPool(20);
try {
server = HttpServerFactory.create(SERVICE_URI, resourceConfig);
server.setExecutor(service);
server.start();
} catch (Exception e) {
e.printStackTrace();
fail("Unable to start server");
}
// LogManager.getRootLogger().setLevel(Level.DEBUG);
}
Aggregations