Commit 8844e794 by Patryk Czarnik

Szablon HTML :-)

parent c726c36d
package sklep.controller;
import java.time.LocalDateTime;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
......@@ -10,9 +8,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
public class RootController {
@RequestMapping("/")
@ResponseBody
public String index() {
return "Spis treści";
return "spis.html";
}
@RequestMapping("/hello")
......@@ -20,12 +17,5 @@ public class RootController {
public String hello() {
return "Hello Spring";
}
@RequestMapping("/time")
@ResponseBody
public String ktoraGodzina() {
LocalDateTime dt = LocalDateTime.now();
return dt.toString();
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Spis HTML</title>
</head>
<body>
<h1>Spis HTML</h1>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment