summaryrefslogtreecommitdiffstats
path: root/sdclient/discovery-service
diff options
context:
space:
mode:
Diffstat (limited to 'sdclient/discovery-service')
-rw-r--r--sdclient/discovery-service/dependency-reduced-pom.xml4
-rw-r--r--sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/DiscoverApp.java5
2 files changed, 6 insertions, 3 deletions
diff --git a/sdclient/discovery-service/dependency-reduced-pom.xml b/sdclient/discovery-service/dependency-reduced-pom.xml
index 1560f5b..1200af2 100644
--- a/sdclient/discovery-service/dependency-reduced-pom.xml
+++ b/sdclient/discovery-service/dependency-reduced-pom.xml
@@ -3,13 +3,13 @@
<parent>
<artifactId>sdclient</artifactId>
<groupId>org.onap.msb.discovery</groupId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.msb.discovery.sdclient</groupId>
<artifactId>discovery-service</artifactId>
<name>onap/msb/discovery/sdclient/discovery-service</name>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<build>
<resources>
<resource>
diff --git a/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/DiscoverApp.java b/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/DiscoverApp.java
index 77c522e..f8328a4 100644
--- a/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/DiscoverApp.java
+++ b/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/DiscoverApp.java
@@ -28,6 +28,7 @@ import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import io.swagger.jaxrs.config.BeanConfig;
import io.swagger.jaxrs.listing.ApiListingResource;
+import java.util.Optional;
public class DiscoverApp extends Application<DiscoverAppConfig> {
@@ -91,7 +92,9 @@ public class DiscoverApp extends Application<DiscoverAppConfig> {
SimpleServerFactory simpleServerFactory = (SimpleServerFactory) configuration.getServerFactory();
// 必须以"/"开头,结尾可有可无"/"
String basePath = simpleServerFactory.getApplicationContextPath();
- String rootPath = simpleServerFactory.getJerseyRootPath();
+ Optional<String> optRootPath = simpleServerFactory.getJerseyRootPath();
+
+ String rootPath = optRootPath.get();
rootPath = rootPath.substring(0, rootPath.indexOf("/*"));