From eb566be1bcd9d443cd79ff58922985dc350a807b Mon Sep 17 00:00:00 2001
From: Johannes Wilhelm <johannes.wilhelm2@stud.th-deg.de>
Date: Wed, 24 Jun 2020 17:18:41 +0200
Subject: [PATCH] xcv Signed-off-by: Johannes Wilhelm
 <johannes.wilhelm2@stud.th-deg.de>

---
 schleicherhof_pms/pom.xml                     |  4 ++++
 .../thd/pms/SchleicherhofPmsApplication.java  |  3 +--
 .../de/thd/pms/controller/HomeController.java | 21 +++++++------------
 .../src/main/resources/application.properties |  6 +++---
 4 files changed, 15 insertions(+), 19 deletions(-)

diff --git a/schleicherhof_pms/pom.xml b/schleicherhof_pms/pom.xml
index 91fd56e..bba117f 100644
--- a/schleicherhof_pms/pom.xml
+++ b/schleicherhof_pms/pom.xml
@@ -23,6 +23,10 @@
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-data-jpa</artifactId>
 		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-thymeleaf</artifactId>
+		</dependency>
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-web</artifactId>
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 23b8b87..d387206 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,10 @@ 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 {
 
 	public static void main(String[] args) {
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 f92e1f8..2cf9d15 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,27 +1,20 @@
 package de.thd.pms.controller;
 
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+//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.servlet.ModelAndView;
 
 
 @Controller
 public class HomeController {
-	private static Logger log = LogManager.getLogger(HomeController.class);
-	
-    
+	    
     @RequestMapping("/welcome")
-    public ModelAndView welcome() {
+    public String welcome() {
+    	return "Hallo Leute";
 
-
-   	log.info("Controller für die Methode welcome");
-		ModelAndView mv = new ModelAndView();
-		mv.addObject("title", "Herzlich Willkommen!");
-		mv.addObject("message", "Sie können hier Boote bzw. Personen anlegen und Fahrten absolvieren.");
-		mv.setViewName("home");
-		return mv;
+   
     }
 
 }
diff --git a/schleicherhof_pms/src/main/resources/application.properties b/schleicherhof_pms/src/main/resources/application.properties
index be4456b..41a9584 100644
--- a/schleicherhof_pms/src/main/resources/application.properties
+++ b/schleicherhof_pms/src/main/resources/application.properties
@@ -1,7 +1,7 @@
 spring.jpa.hibernate.ddl-auto=update 
 spring.datasource.url=jdbc:mysql://localhost:3306/schleicherhof_pms
-spring.datasource.username=root
-spring.datasource.password=password
+spring.datasource.username=
+spring.datasource.password=
 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
-
+server.port=8181
 
-- 
GitLab