summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBruno Sakoto <bruno.sakoto@bell.ca>2021-02-17 17:26:33 -0500
committerBruno Sakoto <bruno.sakoto@bell.ca>2021-02-23 11:03:06 -0500
commit4a56debaac0d6d7a073ae24f1d8099879f121ba1 (patch)
treea70f55a0b5ec6165f850a4cd543132377c637e4a /src
parent696f72a8565963703f3d539d6367a31fd449d514 (diff)
Create application skeleton
This skeleton is used to start validating cps temporal jenkins jobs. Issue-ID: CPS-190 Change-Id: Iccbd4f58eaf2bd3ffaf668f4471b94581425c484 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/cps/temporal/Application.java34
-rw-r--r--src/main/java/org/onap/cps/temporal/controller/QueryController.java35
-rw-r--r--src/test/java/org/onap/cps/temporal/ApplicationTest.java32
3 files changed, 101 insertions, 0 deletions
diff --git a/src/main/java/org/onap/cps/temporal/Application.java b/src/main/java/org/onap/cps/temporal/Application.java
new file mode 100644
index 0000000..57dabb3
--- /dev/null
+++ b/src/main/java/org/onap/cps/temporal/Application.java
@@ -0,0 +1,34 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (c) 2021 Bell Canada.
+ * ================================================================================
+ * 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.cps.temporal;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Main application class for CPS Temporal.
+ */
+@SpringBootApplication
+public class Application {
+
+ public static void main(final String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+
+}
diff --git a/src/main/java/org/onap/cps/temporal/controller/QueryController.java b/src/main/java/org/onap/cps/temporal/controller/QueryController.java
new file mode 100644
index 0000000..b12b451
--- /dev/null
+++ b/src/main/java/org/onap/cps/temporal/controller/QueryController.java
@@ -0,0 +1,35 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (c) 2021 Bell Canada.
+ * ================================================================================
+ * 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.cps.temporal.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Controller for query requests.
+ */
+@RestController
+public class QueryController {
+
+ @RequestMapping("/")
+ public String home() {
+ return "Welcome to CPS Temporal Service!";
+ }
+
+}
diff --git a/src/test/java/org/onap/cps/temporal/ApplicationTest.java b/src/test/java/org/onap/cps/temporal/ApplicationTest.java
new file mode 100644
index 0000000..8d5903f
--- /dev/null
+++ b/src/test/java/org/onap/cps/temporal/ApplicationTest.java
@@ -0,0 +1,32 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (c) 2021 Bell Canada.
+ * Modifications Copyright (C) 2021 Bell Canada.
+ * ================================================================================
+ * 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.cps.temporal;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class ApplicationTest {
+
+ @Test
+ void contextLoads() {
+ }
+
+}