Last change
on this file was 53765dd, checked in by gjoko kostadinov <gjokokostadinov@…>, 9 months ago |
Fix bugs.
|
-
Property mode
set to
100755
|
File size:
891 bytes
|
Rev | Line | |
---|
[204464d] | 1 | package edu.gjoko.schedlr.controllers;
|
---|
| 2 |
|
---|
[763289e] | 3 | import edu.gjoko.schedlr.entity.Stakeholder;
|
---|
[204464d] | 4 | import org.springframework.stereotype.Controller;
|
---|
| 5 | import org.springframework.ui.Model;
|
---|
| 6 | import org.springframework.web.bind.annotation.GetMapping;
|
---|
[763289e] | 7 | import org.springframework.web.bind.annotation.ModelAttribute;
|
---|
| 8 | import org.springframework.web.bind.annotation.PostMapping;
|
---|
[8bcd64c] | 9 | import org.springframework.web.bind.annotation.RequestParam;
|
---|
| 10 |
|
---|
| 11 | import java.security.Principal;
|
---|
[204464d] | 12 |
|
---|
| 13 | @Controller
|
---|
| 14 | public class LoginController {
|
---|
| 15 |
|
---|
[763289e] | 16 | @GetMapping(path = "/login")
|
---|
[8bcd64c] | 17 | public String getMapping(@RequestParam(value = "error", required = false) String error,
|
---|
| 18 | @ModelAttribute Stakeholder customer, Model model) {
|
---|
[204464d] | 19 | return "login";
|
---|
| 20 | }
|
---|
[763289e] | 21 |
|
---|
| 22 | @PostMapping(path = "/login")
|
---|
| 23 | public String loginCustomer(@ModelAttribute Stakeholder customer, Model model) {
|
---|
[53765dd] | 24 | return "redirect:login";
|
---|
[763289e] | 25 | }
|
---|
[204464d] | 26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.