[JAVA-12183] Upgraded restx to latest version(1.0.0-rc3) and moved it to jdk9-and-above profile
This commit is contained in:
parent
3263e20dda
commit
222f5045f1
|
@ -3,8 +3,8 @@
|
|||
"packaging": "war",
|
||||
|
||||
"properties": {
|
||||
"java.version": "1.8",
|
||||
"restx.version": "0.35-rc4"
|
||||
"java.version": "17",
|
||||
"restx.version": "1.0.0-rc3"
|
||||
},
|
||||
"fragments": {
|
||||
"maven": [
|
||||
|
@ -24,7 +24,7 @@
|
|||
"io.restx:restx-i18n-admin:${restx.version}",
|
||||
"io.restx:restx-stats-admin:${restx.version}",
|
||||
"io.restx:restx-servlet:${restx.version}",
|
||||
"io.restx:restx-server-jetty8:${restx.version}!optional",
|
||||
"io.restx:restx-server-jetty11:${restx.version}!optional",
|
||||
"io.restx:restx-apidocs:${restx.version}",
|
||||
"io.restx:restx-specs-admin:${restx.version}",
|
||||
"io.restx:restx-admin:${restx.version}",
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.restx</groupId>
|
||||
<artifactId>restx-server-jetty8</artifactId>
|
||||
<artifactId>restx-server-jetty11</artifactId>
|
||||
<version>${restx.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
@ -137,8 +137,7 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<restx.version>0.35-rc4</restx.version>
|
||||
<assertj.version>1.6.0</assertj.version> <!-- restx requires such an old version -->
|
||||
<restx.version>1.0.0-rc3</restx.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue