package edu.gjoko.schedlr.controllers; import edu.gjoko.schedlr.entity.Stakeholder; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; @Controller public class LoginController { @GetMapping(path = "/login") public String getMapping(@ModelAttribute Stakeholder customer, Model model) { return "login"; } @PostMapping(path = "/login") public String loginCustomer(@ModelAttribute Stakeholder customer, Model model) { return "redirect:homepage"; } }