Commit 0ddcd023 by Patryk Czarnik

Przeniesienie szablonów JSP do katalogu WEB-INF/templates

parent 89c7719c
......@@ -22,7 +22,7 @@ public class ProductController {
public String getProducts(Model model) {
List<Product> products = productRepository.findAll();
model.addAttribute("products", products);
return "products.jsp";
return "/WEB-INF/templates/products.jsp";
}
@GetMapping(path="/products/{id}", produces="text/html")
......@@ -30,9 +30,9 @@ public class ProductController {
Optional<Product> optProduct = productRepository.findById(id);
if(optProduct.isPresent()) {
model.addAttribute("product", optProduct.get());
return "/product.jsp";
return "/WEB-INF/templates/product.jsp";
} else {
return "/missing_product.jsp";
return "/WEB-INF/templates/missing_product.jsp";
}
}
......
......@@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
public class RootController {
@GetMapping("/")
public String index() {
return "spis_tresci.jsp";
return "/WEB-INF/templates/spis_tresci.jsp";
}
@GetMapping("/hello")
......
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