source: src/main/java/edu/gjoko/schedlr/controllers/LoginController.java@ 46fd0c7

Last change on this file since 46fd0c7 was a436340, checked in by Gjoko Kostadinov <gjoko.kostadinov@…>, 17 months ago

Adding customer registration

  • Property mode set to 100644
File size: 708 bytes
RevLine 
[204464d]1package edu.gjoko.schedlr.controllers;
2
[763289e]3import edu.gjoko.schedlr.entity.Stakeholder;
[204464d]4import org.springframework.stereotype.Controller;
5import org.springframework.ui.Model;
6import org.springframework.web.bind.annotation.GetMapping;
[763289e]7import org.springframework.web.bind.annotation.ModelAttribute;
8import org.springframework.web.bind.annotation.PostMapping;
[204464d]9
10@Controller
11public class LoginController {
12
[763289e]13 @GetMapping(path = "/login")
[a436340]14 public String getMapping(@ModelAttribute Stakeholder customer, Model model) {
[204464d]15 return "login";
16 }
[763289e]17
18 @PostMapping(path = "/login")
19 public String loginCustomer(@ModelAttribute Stakeholder customer, Model model) {
20 return "redirect:homepage";
21 }
[204464d]22}
Note: See TracBrowser for help on using the repository browser.