Commit 019a342f by Patryk Czarnik

prefix i suffix

parent a5d8e543
...@@ -11,7 +11,7 @@ import java.time.LocalDateTime; ...@@ -11,7 +11,7 @@ import java.time.LocalDateTime;
public class RootController { public class RootController {
@GetMapping("/") @GetMapping("/")
public String index() { public String index() {
return "/WEB-INF/templates/index.jsp"; return "index";
} }
@GetMapping(path="/hello", produces="text/plain") @GetMapping(path="/hello", produces="text/plain")
...@@ -23,6 +23,6 @@ public class RootController { ...@@ -23,6 +23,6 @@ public class RootController {
@GetMapping("/czas") @GetMapping("/czas")
public String odczytajCzasJsp(Model model) { public String odczytajCzasJsp(Model model) {
model.addAttribute("dt", LocalDateTime.now()); model.addAttribute("dt", LocalDateTime.now());
return "/WEB-INF/templates/wyswietl_czas.jsp"; return "wyswietl_czas";
} }
} }
spring.application.name=PC33-SklepSpring spring.application.name=PC33-SklepSpring
spring.mvc.view.prefix=/WEB-INF/templates/
spring.mvc.view.suffix=.jsp
spring.datasource.url=jdbc:postgresql://localhost/sklep spring.datasource.url=jdbc:postgresql://localhost/sklep
spring.datasource.username=alx spring.datasource.username=alx
......
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