Skip to content
Snippets Groups Projects
Commit eb566be1 authored by Johannes Wilhelm's avatar Johannes Wilhelm
Browse files
parent 1f7ce105
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
......@@ -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) {
......
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;
}
}
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment