Skip to content
Snippets Groups Projects
Commit 22a12ecd authored by Johannes Wilhelm's avatar Johannes Wilhelm
Browse files

neu

parent 6f544b4d
Branches
Tags
No related merge requests found
package de.thd.pms.controller;
import java.beans.JavaBean;
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.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
@JavaBean
@Controller
@RestController
public class HomeController{
@RequestMapping("/")
public String sayHello() {
return "<h1>Hello World</h1>";
}
}
/*@Controller
public class HomeController {
private static Logger log = LogManager.getLogger(HomeController.class);
@RequestMapping("/welcome")
public ModelAndView welcome() {
// Über die log Variable, können Sie Nachrichten auf die Konsole schreiben.
// Welche Nachrichten tatsächlich auf der Konsole erscheine, wird durch die
// Datei log4j.properties gesteuert.
// log.debug("Test");
log.info("Controller für die Methode welcome");
// log.warn("Warnung");
// log.error(message);
// log.fatal(message);
ModelAndView mv = new ModelAndView();
mv.addObject("title", "Herzlich Willkommen!");
mv.addObject("message", "Sie können hier Boote bzw. Personen anlegen und Fahrten absolvieren.");
......@@ -32,3 +33,4 @@ public class HomeController {
}
}
*/
\ No newline at end of file
spring.jpa.hibernate.ddl-auto=none
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3306/schleicherhof_pms
spring.datasource.username=root
spring.datasource.password=password
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment