summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-application
diff options
context:
space:
mode:
Diffstat (limited to 'sparkybe-onap-application')
-rw-r--r--sparkybe-onap-application/pom.xml208
-rw-r--r--sparkybe-onap-application/src/main/config/ajsc-override-web.xml13
-rw-r--r--sparkybe-onap-application/src/main/config/runner-web.xml14
-rw-r--r--sparkybe-onap-application/src/main/docker/Dockerfile21
-rw-r--r--sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java142
-rw-r--r--sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkyConfigLoader.java (renamed from sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/PropertyConfigLoader.java)7
-rw-r--r--sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkyHttpConfigLoader.java32
-rw-r--r--sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkySpringXmlConfiguration.java19
-rw-r--r--sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkySslConfigLoader.java32
-rw-r--r--sparkybe-onap-application/src/main/scripts/start.sh58
10 files changed, 216 insertions, 330 deletions
diff --git a/sparkybe-onap-application/pom.xml b/sparkybe-onap-application/pom.xml
index 92c3126..646b8e3 100644
--- a/sparkybe-onap-application/pom.xml
+++ b/sparkybe-onap-application/pom.xml
@@ -1,5 +1,6 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
@@ -8,9 +9,9 @@
</parent>
<groupId>org.onap.aai.sparky-be</groupId>
- <artifactId>sparkybe-onap-application</artifactId>
+ <artifactId>sparkybe-onap-application</artifactId>
<version>1.2.0-SNAPSHOT</version>
- <packaging>jar</packaging>
+ <packaging>jar</packaging>
<properties>
<java.version>1.8</java.version>
@@ -23,32 +24,34 @@
<nexusproxy>https://nexus.onap.org</nexusproxy>
<camel-spring-boot.version>2.20.0</camel-spring-boot.version>
<config-home>${basedir}/</config-home>
+ <docker.location>${basedir}/target</docker.location>
+ <docker.image.name>sparky-be</docker.image.name>
</properties>
<dependencyManagement>
- <dependencies>
+ <dependencies>
+
+ <!-- Camel BOM -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-boot-dependencies</artifactId>
+ <version>${camel-spring-boot.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
- <!-- Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-boot-dependencies</artifactId>
- <version>${camel-spring-boot.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
-
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>1.2.1</version>
- </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.2.1</version>
+ </dependency>
- </dependencies>
+ </dependencies>
-</dependencyManagement>
+ </dependencyManagement>
<dependencies>
@@ -73,14 +76,14 @@
</exclusion>
</exclusions>
</dependency>
-
+
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
<exclusions>
<exclusion>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
@@ -125,7 +128,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- </dependency>
+ </dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-util -->
<dependency>
@@ -144,11 +147,11 @@
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
- <dependency>
- <groupId>org.onap.aai.sparky-be</groupId>
- <artifactId>sparkybe-onap-service</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </dependency>
+ <dependency>
+ <groupId>org.onap.aai.sparky-be</groupId>
+ <artifactId>sparkybe-onap-service</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </dependency>
@@ -378,13 +381,22 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
+ <configuration>
+ <folders>
+ <folder>
+ ${CONFIG_HOME}/portal/
+ </folder>
+ </folders>
+ </configuration>
</plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
+ <version>2.7</version>
<executions>
<execution>
- <id>copy-docker-file</id>
+ <id>copy-docker-file-to-target</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
@@ -400,8 +412,33 @@
<include>**/*</include>
</includes>
</resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.7</version>
+ <executions>
+ <execution>
+ <id>copy-scripts-to-target</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>target/scripts</outputDirectory>
+ <overwrite>true</overwrite>
+ <resources>
<resource>
- <directory>${basedir}/src/main/bin/</directory>
+ <directory>${basedir}/src/main/scripts</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
</resource>
</resources>
</configuration>
@@ -409,15 +446,16 @@
</executions>
</plugin>
- <plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
+ <version>3.0.0</version>
<executions>
<execution>
- <id>copy-installed</id>
+ <id>copy-war-to-target</id>
<phase>install</phase>
<goals>
- <goal>copy</goal>
+ <goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
@@ -426,15 +464,14 @@
<artifactId>${frontEndArtifactId}</artifactId>
<version>${frontEndVersion}</version>
<type>war</type>
- <outputDirectory>${basedir}/target/</outputDirectory>
- <destFileName>aai.war</destFileName>
+ <outputDirectory>${basedir}/target/static/</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
- </plugin>
-
+ </plugin>
+
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
@@ -486,38 +523,14 @@
</reportPlugins>
</configuration>
</plugin>
-
- <!-- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.7</version>
- <executions>
- <execution>
- <id>copy-docker-file</id>
- <phase>package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>target</outputDirectory>
- <overwrite>true</overwrite>
- <resources>
- <resource>
- <directory>${basedir}/src/main/docker</directory>
- <filtering>true</filtering>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- <resource>
- <directory>${basedir}/src/main/scripts/</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- -->
+
+ <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId>
+ <version>2.7</version> <executions> <execution> <id>copy-docker-file</id>
+ <phase>package</phase> <goals> <goal>copy-resources</goal> </goals> <configuration>
+ <outputDirectory>target</outputDirectory> <overwrite>true</overwrite> <resources>
+ <resource> <directory>${basedir}/src/main/docker</directory> <filtering>true</filtering>
+ <includes> <include>**/*</include> </includes> </resource> <resource> <directory>${basedir}/src/main/scripts/</directory>
+ </resource> </resources> </configuration> </execution> </executions> </plugin> -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
@@ -525,7 +538,7 @@
<configuration>
<verbose>true</verbose>
<serverId>docker-hub</serverId>
- <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName>
+ <imageName>${docker.push.registry}/onap/${docker.image.name}</imageName>
<dockerDirectory>${docker.location}</dockerDirectory>
<imageTags>
<imageTag>latest</imageTag>
@@ -534,41 +547,26 @@
</configuration>
</plugin>
<!-- license plugin -->
-<!-- <plugin>
- <groupId>com.mycila</groupId>
- <artifactId>license-maven-plugin</artifactId>
- <version>3.0</version>
- <configuration>
- <header>LICENSE</header>
- <includes>
- <include>src/main/java/**</include>
- </includes>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>format</goal>
- </goals>
- <phase>process-sources</phase>
- </execution>
- </executions>
- </plugin>
- -->
+ <!-- <plugin> <groupId>com.mycila</groupId> <artifactId>license-maven-plugin</artifactId>
+ <version>3.0</version> <configuration> <header>LICENSE</header> <includes>
+ <include>src/main/java/**</include> </includes> </configuration> <executions>
+ <execution> <goals> <goal>format</goal> </goals> <phase>process-sources</phase>
+ </execution> </executions> </plugin> -->
</plugins>
</build>
- <distributionManagement>
- <repository>
- <id>ecomp-releases</id>
- <name>ECOMP Release Repository</name>
- <url>${nexusproxy}/content/repositories/releases/</url>
- </repository>
- <snapshotRepository>
- <id>ecomp-snapshots</id>
- <name>ECOMP Snapshot Repository</name>
- <url>${nexusproxy}/content/repositories/snapshots/</url>
- </snapshotRepository>
- </distributionManagement>
-
+ <distributionManagement>
+ <repository>
+ <id>ecomp-releases</id>
+ <name>ECOMP Release Repository</name>
+ <url>${nexusproxy}/content/repositories/releases/</url>
+ </repository>
+ <snapshotRepository>
+ <id>ecomp-snapshots</id>
+ <name>ECOMP Snapshot Repository</name>
+ <url>${nexusproxy}/content/repositories/snapshots/</url>
+ </snapshotRepository>
+ </distributionManagement>
+
</project>
diff --git a/sparkybe-onap-application/src/main/config/ajsc-override-web.xml b/sparkybe-onap-application/src/main/config/ajsc-override-web.xml
deleted file mode 100644
index b8ff7da..0000000
--- a/sparkybe-onap-application/src/main/config/ajsc-override-web.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- Copyright (c) 2016 AT&T Intellectual Property. All rights reserved. -->
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
- metadata-complete="false" version="3.0">
-
- <servlet-mapping>
- <servlet-name>PortalRestAPIProxy</servlet-name>
- <url-pattern>/api/v2/*</url-pattern>
- </servlet-mapping>
-
-
-</web-app> \ No newline at end of file
diff --git a/sparkybe-onap-application/src/main/config/runner-web.xml b/sparkybe-onap-application/src/main/config/runner-web.xml
deleted file mode 100644
index ca0c5e2..0000000
--- a/sparkybe-onap-application/src/main/config/runner-web.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- Copyright (c) 2016 AT&T Intellectual Property. All rights reserved. -->
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
- metadata-complete="false" version="3.0">
-
- <servlet>
- <servlet-name>PortalRestAPIProxy</servlet-name>
- <servlet-class>org.openecomp.portalsdk.core.onboarding.crossapi.PortalRestAPIProxy</servlet-class>
- </servlet>
-
-
-
-</web-app>
diff --git a/sparkybe-onap-application/src/main/docker/Dockerfile b/sparkybe-onap-application/src/main/docker/Dockerfile
index d98110c..f5e620c 100644
--- a/sparkybe-onap-application/src/main/docker/Dockerfile
+++ b/sparkybe-onap-application/src/main/docker/Dockerfile
@@ -16,15 +16,22 @@ RUN export JAVA_HOME
# Build up the deployment folder structure
RUN mkdir -p $MICRO_HOME
RUN mkdir -p $BIN_HOME
+RUN mkdir -p $MICRO_HOME/lib/
+RUN mkdir -p $MICRO_HOME/static/services/aai/webapp/
-# copy swm/package/nix/dist_files/appl/sparky-be/${project.version}/ $MICRO_HOME/
-RUN ls -la $BIN_HOME/
+ADD *.jar $MICRO_HOME/lib/
+ADD scripts/* $MICRO_HOME/bin/
+COPY static/ $MICRO_HOME/static/services/aai/webapp/
+
+RUN chmod 755 $MICRO_HOME/bin/*
+RUN chmod 755 $MICRO_HOME/lib/*
+RUN chmod 755 $MICRO_HOME/static/*
+
+#RUN ls -la $BIN_HOME/
-#RUN chmod 755 $BIN_HOME/*
RUN ln -s /logs $MICRO_HOME/logs
EXPOSE 8000 8000
-
-CMD tail -F -n0 /etc/hosts
-#CMD /opt/app/sparky/bin/start.sh
-#CMD top
+EXPOSE 9517 9517
+
+CMD ["/opt/app/sparky/bin/start.sh"] \ No newline at end of file
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 548a48b..1077642 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
@@ -18,97 +18,32 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-/**
- * This copy of Woodstox XML processor is licensed under the
- * Apache (Software) License, version 2.0 ("the License").
- * See the License for details about distribution rights, and the
- * specific rights regarding derivate works.
- *
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/
- *
- * A copy is also included in the downloadable source code package
- * containing Woodstox, in file "ASL2.0", under the same directory
- * as this file.
- */
package org.onap.aai.sparky;
-import org.apache.camel.builder.RouteBuilder;
+import javax.servlet.Filter;
+
+import org.onap.aai.sparky.security.filter.LoginFilter;
+
import org.apache.camel.component.servlet.CamelHttpTransportServlet;
-import org.apache.camel.model.rest.RestBindingMode;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
-import org.springframework.boot.web.support.SpringBootServletInitializer;
-import org.springframework.context.ApplicationContext;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
-import org.springframework.stereotype.Component;
@SpringBootApplication
-public class Application /*extends SpringBootServletInitializer */ {
-
- private @Autowired AutowireCapableBeanFactory beanFactory;
-
- public static void main(String[] args) {
+public class Application {
- ApplicationContext applicationContext = SpringApplication.run(Application.class, args);
-
- /*for (String name : applicationContext.getBeanDefinitionNames()) {
- System.out.println(name);
- }*/
+ private Filter loginFilter = new LoginFilter();
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
}
-
- /* @Component
- class RestApi extends RouteBuilder {
-
- @Override
- public void configure() {
-
- //restConfiguration().component("restlet").contextPath("/rs").bindingMode(RestBindingMode.json);
-
- /*rest("/books").description("Books REST service")
- .get("/").description("The list of all the books")
- .route().routeId("books-api")
- .bean(Database.class, "findBooks")
- .endRest()
- .get("order/{id}").description("Details of an order by id")
- .route().routeId("order-api")
- .bean(Database.class, "findOrder(${header.id})");*/
- /* }
- }*/
-
-
- /*
- * TODO: we need to figure out the initialization required for our restlets
- */
-
- /*@Bean
- public ServletRegistrationBean restletBootstrapInitialization() {
-
- SpringServerServlet serverServlet = new SpringServerServlet();
- ServletRegistrationBean regBean = new ServletRegistrationBean( serverServlet, "/rest/*");
-
-
- Map<String,String> params = new HashMap<String,String>();
-
- params.put("org.restlet.component", "restletComponent");
-
- regBean.setInitParameters(params);
-
- return regBean;
- }*/
-
-
-
/*
* This initialization code enabled access to aai-ui-proxy-processor
*/
-
@Bean
ServletRegistrationBean servletRegistrationBean() {
final ServletRegistrationBean servlet =
@@ -117,51 +52,20 @@ public class Application /*extends SpringBootServletInitializer */ {
return servlet;
}
- /* @Bean
- public EmbeddedServletContainerFactory servletContainerFactory() {
- return new TomcatEmbeddedServletContainerFactory() {
-
- /*
- * Stackoverflow solution for adding a WAR into our embedded tomcat runtime
- * https://stackoverflow.com/questions/31374726/spring-boot-how-to-add-another-war-files-to-the-embedded-tomcat
- */
-
-
- /* @Override
- protected TomcatEmbeddedServletContainer getTomcatEmbeddedServletContainer(Tomcat tomcat) {
- // Ensure that the webapps directory exists
- System.out.println("catalina base = " + tomcat.getServer().getCatalinaBase());
- new File(tomcat.getServer().getCatalinaBase(), "webapps").mkdirs();
-
- try {
- Context context = tomcat.addWebapp("/services/aai/webapp", "X:\\2018_dev\\OSEAAI\\NUC-7257-spring-boot-conversion\\onap_sparky-be\\src\\main\\resources\\extApps\\aai.war");
+ /**
+ * bind LoginFilter
+ */
+ @Bean
+ @ConditionalOnProperty(value = "sparky.portal.enabled", havingValue = "true")
+ public FilterRegistrationBean loginFilterRegistrationBean() {
+ FilterRegistrationBean registration = new FilterRegistrationBean();
+
+ registration.setFilter(loginFilter);
+ registration.addUrlPatterns("/*");
+
+ return registration;
+ }
- // Allow the webapp to load classes from your fat jar
- context.setParentClassLoader(getClass().getClassLoader());
- } catch (ServletException ex) {
- throw new IllegalStateException("Failed to add webapp", ex);
- }
- return super.getTomcatEmbeddedServletContainer(tomcat);
- }
- };
- }*/
- /**
- * bind LoginFilter
- */
-
- /*@Bean
- public FilterRegistrationBean myFilter() {
- FilterRegistrationBean registration = new FilterRegistrationBean();
- Filter myFilter = new LoginFilter();
- beanFactory.autowireBean(myFilter);
- registration.setFilter(myFilter);
- registration.addUrlPatterns("/*");
- return registration;
- }*/
-
-
-
-
}
diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/PropertyConfigLoader.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkyConfigLoader.java
index dfc4b2b..5124ce7 100644
--- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/PropertyConfigLoader.java
+++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkyConfigLoader.java
@@ -24,7 +24,8 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
@Configuration
-@PropertySource("file:${CONFIG_HOME}/config/sparky-application.properties")
-public class PropertyConfigLoader {
-
+@PropertySource("file:${CONFIG_HOME}/sparky-application.properties")
+public class SparkyConfigLoader {
+
+
}
diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkyHttpConfigLoader.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkyHttpConfigLoader.java
new file mode 100644
index 0000000..4c1d541
--- /dev/null
+++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkyHttpConfigLoader.java
@@ -0,0 +1,32 @@
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.aai.sparky.config;
+
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+
+@Configuration
+@ConditionalOnProperty(value="sparky.ssl.enabled", havingValue = "true")
+@PropertySource("file:${CONFIG_HOME}/sparky-ssl-config.properties")
+public class SparkyHttpConfigLoader {
+
+}
diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkySpringXmlConfiguration.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkySpringXmlConfiguration.java
index 79656d5..dbbe61d 100644
--- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkySpringXmlConfiguration.java
+++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkySpringXmlConfiguration.java
@@ -18,25 +18,12 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-/**
- * This copy of Woodstox XML processor is licensed under the
- * Apache (Software) License, version 2.0 ("the License").
- * See the License for details about distribution rights, and the
- * specific rights regarding derivate works.
- *
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/
- *
- * A copy is also included in the downloadable source code package
- * containing Woodstox, in file "ASL2.0", under the same directory
- * as this file.
- */
+
package org.onap.aai.sparky.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
@Configuration
-@ImportResource({"file:${CONFIG_HOME}/dynamic/spring-beans/*.xml"})
-public class SparkySpringXmlConfiguration {}
+@ImportResource({"file:${CONFIG_HOME}/spring-beans/*.xml"})
+public class SparkySpringXmlConfiguration {} \ No newline at end of file
diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkySslConfigLoader.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkySslConfigLoader.java
new file mode 100644
index 0000000..c493f64
--- /dev/null
+++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkySslConfigLoader.java
@@ -0,0 +1,32 @@
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.aai.sparky.config;
+
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+
+@Configuration
+@ConditionalOnProperty(value="sparky.ssl.enabled", havingValue = "false")
+@PropertySource("file:${CONFIG_HOME}/sparky-http-config.properties")
+public class SparkySslConfigLoader {
+
+}
diff --git a/sparkybe-onap-application/src/main/scripts/start.sh b/sparkybe-onap-application/src/main/scripts/start.sh
index 514d7c5..f2f6f31 100644
--- a/sparkybe-onap-application/src/main/scripts/start.sh
+++ b/sparkybe-onap-application/src/main/scripts/start.sh
@@ -1,59 +1,11 @@
#!/bin/sh
-BASEDIR="/opt/app/sparky"
-MICRO_HOME="$BASEDIR"
-CONFIG_HOME=${MICRO_HOME}/config
+APP_HOME="/opt/app/sparky"
+CONFIG_HOME=${APP_HOME}/appconfig
-if [ -z "$CONFIG_HOME" ]; then
- echo "CONFIG_HOME must be set in order to start up process"
- exit 1
-fi
-
-PROPS="-DCONFIG_HOME=${CONFIG_HOME}"
-
-#echo $CLASSPATH
+PROPS="-DAPP_HOME=${APP_HOME} -DCONFIG_HOME=${CONFIG_HOME}"
set -x
-exec java -Xms1024m -Xmx4096m $PROPS -jar ${MICRO_HOME}/sparky-be.jar --spring.config.name=sparky-be-application
-
-
-
-
-#if [ -z "$KEY_STORE_PASSWORD" ]; then
-# echo "KEY_STORE_PASSWORD must be set in order to start up process"
-# exit 1
-#else
-# sed -i /"KEY_STORE_PASSWORD"/d $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
-# echo "KEY_STORE_PASSWORD=$KEY_STORE_PASSWORD" >> $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
-#fi
-
-#if [ -z "$KEY_MANAGER_PASSWORD" ]; then
-# echo "KEY_MANAGER_PASSWORD must be set in order to start up process"
-# exit 1
-#else
-# sed -i /"KEY_MANAGER_PASSWORD"/d $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
-# echo "KEY_MANAGER_PASSWORD=$KEY_MANAGER_PASSWORD" >> $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
-#fi
-
-#CLASSPATH="$AJSC_HOME/lib/ajsc-runner-2.0.0.jar"
-#CLASSPATH="$CLASSPATH:$AJSC_HOME/extJars/"
-#CLASSPATH="$CLASSPATH:$CONFIG_HOME/portal/"
-#PROPS="-DAJSC_HOME=$AJSC_HOME"
-#PROPS="$PROPS -DAJSC_CONF_HOME=$BASEDIR/bundleconfig/"
-#PROPS="$PROPS -Dlogback.configurationFile=$BASEDIR/bundleconfig/etc/logback.xml"
-#PROPS="$PROPS -DAJSC_SHARED_CONFIG=$AJSC_CONF_HOME"
-#PROPS="$PROPS -DAJSC_EXTERNAL_LIB_FOLDERS=$AJSC_HOME/commonLibs"
-#PROPS="$PROPS -DAJSC_EXTERNAL_PROPERTIES_FOLDERS=$AJSC_HOME/ajsc-shared-config/etc"
-#PROPS="$PROPS -DAJSC_SERVICE_NAMESPACE=ajsc-tier-support-ui"
-#PROPS="$PROPS -DAJSC_SERVICE_VERSION=v1"
-#PROPS="$PROPS -DSOACLOUD_SERVICE_VERSION=0.0.0"
-#PROPS="$PROPS -Dserver.port=8000"
-#PROPS="$PROPS -DCONFIG_HOME=$CONFIG_HOME"
-
-#echo $CLASSPATH
+jar ufv ${APP_HOME}/lib/sparkybe-onap-application*.jar -C ${CONFIG_HOME}/portal/ BOOT-INF/classes/portal.properties
+java -Xms1024m -Xmx4096m $PROPS -jar ${APP_HOME}/lib/sparkybe-onap-application*.jar --sparky.ssl.enabled=${UI_SSL_ENABLED} --sparky.portal.enabled=${UI_PORTAL_ENABLED}
-#if [ "$UI_HTTPS_PORT" ]; then
-# /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xms1024m -Xmx4096m $PROPS -classpath $CLASSPATH com.att.ajsc.runner.Runner context=/ sslport=$UI_HTTPS_PORT
-#elif [ "$UI_HTTP_PORT" ]; then
-# /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xms1024m -Xmx4096m $PROPS -classpath $CLASSPATH com.att.ajsc.runner.Runner context=/ port=$UI_HTTP_PORT
-#fi