From 7ea055f88edd7f247a8afb20b89508ee7213077c Mon Sep 17 00:00:00 2001 From: Parpaillax Date: Tue, 23 Apr 2024 10:52:19 +0200 Subject: [PATCH] profile --- .../controllers/ProfileController.java | 25 +++++++++++++++++ src/main/resources/templates/profile.html | 27 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 src/main/java/fr/eni/enchere/controllers/ProfileController.java create mode 100644 src/main/resources/templates/profile.html diff --git a/src/main/java/fr/eni/enchere/controllers/ProfileController.java b/src/main/java/fr/eni/enchere/controllers/ProfileController.java new file mode 100644 index 0000000..db3876c --- /dev/null +++ b/src/main/java/fr/eni/enchere/controllers/ProfileController.java @@ -0,0 +1,25 @@ +package fr.eni.enchere.controllers; + +import fr.eni.enchere.bo.UserProfil; +import org.springframework.ui.Model; +import fr.eni.enchere.bll.UserService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller() +@RequestMapping("/profile") +public class ProfileController { + + private final UserService userService; + + public ProfileController(UserService userService) { + this.userService = userService; + } + + @GetMapping + public String viewProfile(Model model) { + model.addAttribute("user", new UserProfil()); + return "profile"; + } +} diff --git a/src/main/resources/templates/profile.html b/src/main/resources/templates/profile.html new file mode 100644 index 0000000..4793090 --- /dev/null +++ b/src/main/resources/templates/profile.html @@ -0,0 +1,27 @@ + + + + + Mon profile + + +
+
+

Mon profile

+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ + \ No newline at end of file