commit 8c7d727e9846c4ee8aa11da58a580f1ef7997a4f Author: Filip Izydorczyk Date: Tue Jun 9 18:14:49 2020 +0200 project structure + spring boot diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a2a3040 --- /dev/null +++ b/.gitignore @@ -0,0 +1,31 @@ +HELP.md +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/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ + +### VS Code ### +.vscode/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad7dc20 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +docker-compose -f stack.yml up diff --git a/buisnesslogic/pom.xml b/buisnesslogic/pom.xml new file mode 100644 index 0000000..9c8dcd5 --- /dev/null +++ b/buisnesslogic/pom.xml @@ -0,0 +1,78 @@ + + + 4.0.0 + + backend + com.plannaplan + 1.0-SNAPSHOT + + + com.plannaplan + buisnesslogic + 1.0-SNAPSHOT + + buisnesslogic + + http://www.example.com + + + UTF-8 + 1.8 + 1.8 + + + + + junit + junit + 4.11 + test + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + diff --git a/buisnesslogic/src/main/java/com/plannaplan/App.java b/buisnesslogic/src/main/java/com/plannaplan/App.java new file mode 100644 index 0000000..dbfe26e --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/App.java @@ -0,0 +1,13 @@ +package com.plannaplan; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} diff --git a/buisnesslogic/src/test/java/com/plannaplan/AppTest.java b/buisnesslogic/src/test/java/com/plannaplan/AppTest.java new file mode 100644 index 0000000..c2cebc0 --- /dev/null +++ b/buisnesslogic/src/test/java/com/plannaplan/AppTest.java @@ -0,0 +1,20 @@ +package com.plannaplan; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +} diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..102a24b --- /dev/null +++ b/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.2.2.RELEASE + + + + com.plannaplan + backend + 1.0-SNAPSHOT + pom + + backend + + http://www.example.com + + + UTF-8 + 1.8 + 1.8 + + + + + junit + junit + 4.11 + test + + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + buisnesslogic + restservice + + diff --git a/restservice/pom.xml b/restservice/pom.xml new file mode 100644 index 0000000..45c5909 --- /dev/null +++ b/restservice/pom.xml @@ -0,0 +1,100 @@ + + + 4.0.0 + + backend + com.plannaplan + 1.0-SNAPSHOT + + + com.plannaplan + restservice + 1.0-SNAPSHOT + + restservice + + http://www.example.com + + + UTF-8 + 1.8 + 1.8 + + + + + junit + junit + 4.11 + test + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/restservice/src/main/java/com/plannaplan/App.java b/restservice/src/main/java/com/plannaplan/App.java new file mode 100644 index 0000000..606c0b3 --- /dev/null +++ b/restservice/src/main/java/com/plannaplan/App.java @@ -0,0 +1,12 @@ +package com.plannaplan; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); + SpringApplication.run(App.class, args); + } +} diff --git a/restservice/src/main/resources/application.properties b/restservice/src/main/resources/application.properties new file mode 100644 index 0000000..bafddce --- /dev/null +++ b/restservice/src/main/resources/application.properties @@ -0,0 +1 @@ +server.port=8081 \ No newline at end of file diff --git a/restservice/src/test/java/com/plannaplan/AppTest.java b/restservice/src/test/java/com/plannaplan/AppTest.java new file mode 100644 index 0000000..c2cebc0 --- /dev/null +++ b/restservice/src/test/java/com/plannaplan/AppTest.java @@ -0,0 +1,20 @@ +package com.plannaplan; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +} diff --git a/stack.yml b/stack.yml new file mode 100644 index 0000000..039b17f --- /dev/null +++ b/stack.yml @@ -0,0 +1,15 @@ +# Use root/example as user/password credentials +version: "3.1" + +services: + db: + image: mariadb + restart: always + environment: + MYSQL_ROOT_PASSWORD: example + + adminer: + image: adminer + restart: always + ports: + - 8080:8080