From bd4a06e603375bc7303f5cf7d969f9fa49228237 Mon Sep 17 00:00:00 2001
From: Sonia Zorba <sonia.zorba@inaf.it>
Date: Tue, 2 Jul 2019 09:29:23 +0200
Subject: [PATCH] Setup backend app with Spring Initializr

---
 .gitignore                                    | 36 +++++++++++-
 gms/pom.xml                                   | 58 +++++++++++++++++++
 .../java/it/inaf/ia2/gms/GmsApplication.java  | 12 ++++
 gms/src/main/resources/application.properties |  1 +
 .../it/inaf/ia2/gms/GmsApplicationTests.java  | 15 +++++
 5 files changed, 121 insertions(+), 1 deletion(-)
 create mode 100644 gms/pom.xml
 create mode 100644 gms/src/main/java/it/inaf/ia2/gms/GmsApplication.java
 create mode 100644 gms/src/main/resources/application.properties
 create mode 100644 gms/src/test/java/it/inaf/ia2/gms/GmsApplicationTests.java

diff --git a/.gitignore b/.gitignore
index a0dddc6..ed9e360 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
 .DS_Store
 node_modules
-/dist
+gms-ui/dist
 
 # local env files
 .env.local
@@ -19,3 +19,37 @@ yarn-error.log*
 *.njsproj
 *.sln
 *.sw?
+
+HELP.md
+gms/target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**
+!**/src/test/**
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+nbactions.xml
+
+### VS Code ###
+.vscode/
+
diff --git a/gms/pom.xml b/gms/pom.xml
new file mode 100644
index 0000000..1aeca7e
--- /dev/null
+++ b/gms/pom.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.1.6.RELEASE</version>
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+    <groupId>it.inaf.ia2</groupId>
+    <artifactId>gms</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>gms</name>
+    <description>Group Membership Service</description>
+
+    <properties>
+        <java.version>1.8</java.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.security.oauth.boot</groupId>
+            <artifactId>spring-security-oauth2-autoconfigure</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <scope>runtime</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.security</groupId>
+            <artifactId>spring-security-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/gms/src/main/java/it/inaf/ia2/gms/GmsApplication.java b/gms/src/main/java/it/inaf/ia2/gms/GmsApplication.java
new file mode 100644
index 0000000..5833724
--- /dev/null
+++ b/gms/src/main/java/it/inaf/ia2/gms/GmsApplication.java
@@ -0,0 +1,12 @@
+package it.inaf.ia2.gms;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class GmsApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(GmsApplication.class, args);
+    }
+}
diff --git a/gms/src/main/resources/application.properties b/gms/src/main/resources/application.properties
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/gms/src/main/resources/application.properties
@@ -0,0 +1 @@
+
diff --git a/gms/src/test/java/it/inaf/ia2/gms/GmsApplicationTests.java b/gms/src/test/java/it/inaf/ia2/gms/GmsApplicationTests.java
new file mode 100644
index 0000000..a0242fa
--- /dev/null
+++ b/gms/src/test/java/it/inaf/ia2/gms/GmsApplicationTests.java
@@ -0,0 +1,15 @@
+package it.inaf.ia2.gms;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class GmsApplicationTests {
+
+    @Test
+    public void contextLoads() {
+    }
+}
-- 
GitLab