summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-application
diff options
context:
space:
mode:
authorrv871f <richard.vondadelszen@amdocs.com>2018-04-16 15:36:16 -0400
committerrv871f <richard.vondadelszen@amdocs.com>2018-04-16 15:37:02 -0400
commit5863150621970df88c0c782d906bfab98b2ddd32 (patch)
treebdad77ec1ea80814cccb20eb36386e8b190edd0b /sparkybe-onap-application
parentce2daad8fe1d7158c11a2a386ac28aa41db66cdc (diff)
portal api proxy added
Issue-ID: AAI-1034 Change-Id: I2061e16684a3f1ba5c751d75db3c5d93247227fa Signed-off-by: rv871f <richard.vondadelszen@amdocs.com>
Diffstat (limited to 'sparkybe-onap-application')
-rw-r--r--sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java
index 2ffa433..2334297 100644
--- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java
+++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java
@@ -25,6 +25,7 @@ import javax.servlet.Filter;
import org.apache.camel.component.servlet.CamelHttpTransportServlet;
import org.onap.aai.sparky.config.PropertyPasswordConfiguration;
import org.onap.aai.sparky.security.filter.LoginFilter;
+import org.openecomp.portalsdk.core.onboarding.crossapi.PortalRestAPIProxy;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
@@ -103,5 +104,17 @@ public class Application {
return registration;
}
+ /**
+ * Bind the Portal API Proxy
+ */
+ @Bean
+ @ConditionalOnProperty(value = "sparky.portal.enabled", havingValue = "true")
+ public ServletRegistrationBean portalApiProxy() {
+
+ final ServletRegistrationBean servlet =
+ new ServletRegistrationBean(new PortalRestAPIProxy(), "/api/v2/*");
+ servlet.setName("PortalRestApiProxy");
+ return servlet;
+ }
}