From 4247a8bcb4d0028498e5620bd17e001672560251 Mon Sep 17 00:00:00 2001
From: Johannes Wilhelm <johannes.wilhelm2@stud.th-deg.de>
Date: Thu, 25 Jun 2020 14:32:47 +0200
Subject: [PATCH] neu

---
 .../thd/pms/SchleicherhofPmsApplication.java  |  4 +---
 .../de/thd/pms/controller/HomeController.java | 19 +++++++------------
 .../src/main/resources/application.properties |  2 +-
 .../src/main/resources/templates/home.html    | 13 +++++++++++++
 4 files changed, 22 insertions(+), 16 deletions(-)
 create mode 100644 schleicherhof_pms/src/main/resources/templates/home.html

diff --git a/schleicherhof_pms/src/main/java/de/thd/pms/SchleicherhofPmsApplication.java b/schleicherhof_pms/src/main/java/de/thd/pms/SchleicherhofPmsApplication.java
index 33f1202..5fbd06d 100644
--- a/schleicherhof_pms/src/main/java/de/thd/pms/SchleicherhofPmsApplication.java
+++ b/schleicherhof_pms/src/main/java/de/thd/pms/SchleicherhofPmsApplication.java
@@ -2,11 +2,9 @@ package de.thd.pms;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.ComponentScan;
-
 
 @SpringBootApplication
-@ComponentScan({"com.mypackage.controller"})
+
 
 public class SchleicherhofPmsApplication {
 
diff --git a/schleicherhof_pms/src/main/java/de/thd/pms/controller/HomeController.java b/schleicherhof_pms/src/main/java/de/thd/pms/controller/HomeController.java
index ef4baa9..cbdb269 100644
--- a/schleicherhof_pms/src/main/java/de/thd/pms/controller/HomeController.java
+++ b/schleicherhof_pms/src/main/java/de/thd/pms/controller/HomeController.java
@@ -1,25 +1,20 @@
+
 package de.thd.pms.controller;
 
-//import org.apache.logging.log4j.LogManager;
-//import org.apache.logging.log4j.Logger;
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
-//import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.bind.annotation.RestController;
 
 
-@Controller
-public class HomeController {
-	    
 
+@RestController
+public class HomeController {
 	
 
     @RequestMapping("/welcome")
-
-    public String welcome() {
-    			
-    			return "hallo";
+    public String home() {
+    	return "Hallo Leute";
     
-
+   
     }
 
 }
diff --git a/schleicherhof_pms/src/main/resources/application.properties b/schleicherhof_pms/src/main/resources/application.properties
index dbb6b39..6fc471f 100644
--- a/schleicherhof_pms/src/main/resources/application.properties
+++ b/schleicherhof_pms/src/main/resources/application.properties
@@ -3,4 +3,4 @@ spring.datasource.url=jdbc:mysql://localhost:3306/schleicherhof_pms
 spring.datasource.username=
 spring.datasource.password=
 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
-server.port=4321
+#server.port=4321
diff --git a/schleicherhof_pms/src/main/resources/templates/home.html b/schleicherhof_pms/src/main/resources/templates/home.html
new file mode 100644
index 0000000..c1e1dc2
--- /dev/null
+++ b/schleicherhof_pms/src/main/resources/templates/home.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="de" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
+<head th:include="head::head"></head>
+<body>
+	<div class="container-fluid">
+		<h1>Fahrtenbuch</h1>
+	</div>
+	<nav th:include="menu::menu"></nav>
+	<div class="container-fluid"><h2 th:text="${title}">Titel</h2></div>
+	<div class="container-fluid"><p th:text="${message}">Nachricht</p></div>
+	<div th:include="foot::foot"></div>
+</body>
+</html>
-- 
GitLab