summaryrefslogtreecommitdiffstats
path: root/ms/generic-resource-api/src/main
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-10-27 16:47:24 -0400
committerDan Timoney <dtimoney@att.com>2020-10-27 16:47:24 -0400
commit370f5fe6f8c90bb35a9529f19d862e63a2cf8b9d (patch)
treea47de0f116057f88c912bd0e32a0818cfbfb962d /ms/generic-resource-api/src/main
parent9b90144c883eb42937f601f9e8ea32c4895fc072 (diff)
Import SLI-API controller
Import sliboot controller to implement SLI-API interface. Change-Id: Iea85a9cb128366fa0f580852d9f2fa71405a4bad Issue-ID: SDNC-1400 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'ms/generic-resource-api/src/main')
-rw-r--r--ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/GenericResourceMsApp.java (renamed from ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/core/GenericResourceMsApp.java)15
-rw-r--r--ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/core/WebConfig.java54
-rw-r--r--ms/generic-resource-api/src/main/resources/schema-derby.sql4
3 files changed, 14 insertions, 59 deletions
diff --git a/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/core/GenericResourceMsApp.java b/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/GenericResourceMsApp.java
index e3a2bd7..9501f99 100644
--- a/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/core/GenericResourceMsApp.java
+++ b/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/GenericResourceMsApp.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.sdnc.apps.ms.gra.core;
+package org.onap.sdnc.apps.ms.gra;
import org.apache.shiro.realm.Realm;
import org.apache.shiro.realm.text.PropertiesRealm;
@@ -29,13 +29,22 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.onap.ccsdk.apps.ms.sliboot.controllers.RestconfApiController;
+
import springfox.documentation.swagger2.annotations.EnableSwagger2;
-@SpringBootApplication(scanBasePackages= { "org.onap.sdnc.apps.ms.gra.*", "org.onap.ccsdk.apps.services"})
+@SpringBootApplication(scanBasePackages={ "org.onap.sdnc.apps.ms.gra", "org.onap.ccsdk.apps.services"})
+@EnableJpaRepositories(basePackages={"org.onap.sdnc.apps.ms.gra", "org.onap.ccsdk.apps.ms.sliboot"})
+@EntityScan(basePackages={"org.onap.sdnc.apps.ms.gra", "org.onap.ccsdk.apps.ms.sliboot"})
+@EnableTransactionManagement
+@Import(RestconfApiController.class)
@EnableSwagger2
+
public class GenericResourceMsApp {
private static final Logger log = LoggerFactory.getLogger(GenericResourceMsApp.class);
diff --git a/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/core/WebConfig.java b/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/core/WebConfig.java
deleted file mode 100644
index 5c1a923..0000000
--- a/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/core/WebConfig.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SDNC
- * ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * 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.sdnc.apps.ms.gra.core;
-
-import org.onap.logging.filter.spring.LoggingInterceptor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.domain.EntityScan;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-import org.springframework.jdbc.datasource.DriverManagerDataSource;
-import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
-import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
-import org.springframework.orm.jpa.JpaTransactionManager;
-import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
-import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
-import org.springframework.transaction.PlatformTransactionManager;
-import org.springframework.transaction.annotation.EnableTransactionManagement;
-import org.springframework.web.servlet.config.annotation.EnableWebMvc;
-import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-
-import javax.persistence.EntityManagerFactory;
-import javax.sql.DataSource;
-
-@Configuration
-@EnableJpaRepositories("org.onap.sdnc.apps.ms.gra.*")
-@ComponentScan(basePackages={"org.onap.sdnc.apps.ms.gra.*", "org.onap.ccsdk.apps.services"})
-@EntityScan("org.onap.sdnc.apps.ms.gra.*")
-@EnableTransactionManagement
-public class WebConfig implements WebMvcConfigurer {
-
-
-}
diff --git a/ms/generic-resource-api/src/main/resources/schema-derby.sql b/ms/generic-resource-api/src/main/resources/schema-derby.sql
index 52afd71..8d691cc 100644
--- a/ms/generic-resource-api/src/main/resources/schema-derby.sql
+++ b/ms/generic-resource-api/src/main/resources/schema-derby.sql
@@ -1,7 +1,7 @@
-CREATE SCHEMA sdnctl;
+CREATE SCHEMA gra;
-SET SCHEMA sdnctl;
+SET SCHEMA gra;
--
-- Table structure for table ACCESS_LOG