Last change
on this file since 9050790 was a436340, checked in by Gjoko Kostadinov <gjoko.kostadinov@…>, 20 months ago |
Adding customer registration
|
-
Property mode
set to
100644
|
File size:
708 bytes
|
Line | |
---|
1 | package edu.gjoko.schedlr.controllers;
|
---|
2 |
|
---|
3 | import edu.gjoko.schedlr.entity.Stakeholder;
|
---|
4 | import org.springframework.stereotype.Controller;
|
---|
5 | import org.springframework.ui.Model;
|
---|
6 | import org.springframework.web.bind.annotation.GetMapping;
|
---|
7 | import org.springframework.web.bind.annotation.ModelAttribute;
|
---|
8 | import org.springframework.web.bind.annotation.PostMapping;
|
---|
9 |
|
---|
10 | @Controller
|
---|
11 | public class LoginController {
|
---|
12 |
|
---|
13 | @GetMapping(path = "/login")
|
---|
14 | public String getMapping(@ModelAttribute Stakeholder customer, Model model) {
|
---|
15 | return "login";
|
---|
16 | }
|
---|
17 |
|
---|
18 | @PostMapping(path = "/login")
|
---|
19 | public String loginCustomer(@ModelAttribute Stakeholder customer, Model model) {
|
---|
20 | return "redirect:homepage";
|
---|
21 | }
|
---|
22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.