michaelin007 2024-01-22 09:13:06 +00:00
parent b9c8a43ff0
commit f33fe359fa
4 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,13 @@
package com.baeldung.thymeleaf.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class PetController {
@RequestMapping("/")
public String home() {
return "index";
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Baeldung Pet Store</title>
</head>
<body>
<h1>Welcome Image</h1>
<h6>Pet Store</h6>
<img th:src="@{images/cat.jpg}" alt="cat">
<img th:src="@{cat.jpg}" alt="cat">
</body>
</html>