[JAVA-12183] Upgraded restx to latest version(1.0.0-rc3) and moved it to jdk9-and-above profile
This commit is contained in:
@@ -3,13 +3,13 @@ package restx.demo;
|
||||
import restx.config.ConfigLoader;
|
||||
import restx.config.ConfigSupplier;
|
||||
import restx.factory.Provides;
|
||||
import restx.security.*;
|
||||
import restx.factory.Module;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import restx.security.*;
|
||||
import restx.factory.Module;
|
||||
import restx.factory.Provides;
|
||||
|
||||
import javax.inject.Named;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
@@ -30,7 +30,7 @@ public class AppModule {
|
||||
@Provides
|
||||
public ConfigSupplier appConfigSupplier(ConfigLoader configLoader) {
|
||||
// Load settings.properties in restx.demo package as a set of config entries
|
||||
return configLoader.fromResource("restx/demo/settings");
|
||||
return configLoader.fromResource("web-modules/restx/demo/settings");
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
||||
@@ -2,7 +2,7 @@ package restx.demo;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import restx.server.WebServer;
|
||||
import restx.server.Jetty8WebServer;
|
||||
import restx.server.Jetty11WebServer;
|
||||
|
||||
/**
|
||||
* This class can be used to run the app.
|
||||
@@ -12,12 +12,12 @@ import restx.server.Jetty8WebServer;
|
||||
* Reading the port from system env PORT makes it compatible with heroku.
|
||||
*/
|
||||
public class AppServer {
|
||||
public static final String WEB_INF_LOCATION = "src/main/webapp/WEB-INF/web.xml";
|
||||
public static final String WEB_APP_LOCATION = "src/main/webapp";
|
||||
public static final String WEB_INF_LOCATION = "web-modules/restx/src/main/webapp/WEB-INF/web.xml";
|
||||
public static final String WEB_APP_LOCATION = "web-modules/restx/src/main/webapp";
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
int port = Integer.valueOf(Optional.fromNullable(System.getenv("PORT")).or("8080"));
|
||||
WebServer server = new Jetty8WebServer(WEB_INF_LOCATION, WEB_APP_LOCATION, port, "0.0.0.0");
|
||||
WebServer server = new Jetty11WebServer(WEB_INF_LOCATION, WEB_APP_LOCATION, port, "0.0.0.0");
|
||||
|
||||
/*
|
||||
* load mode from system property if defined, or default to dev
|
||||
|
||||
Reference in New Issue
Block a user