Last change
on this file since f29cd58 was 53765dd, checked in by gjoko kostadinov <gjokokostadinov@…>, 9 months ago |
Fix bugs.
|
-
Property mode
set to
100755
|
File size:
891 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 | import org.springframework.web.bind.annotation.RequestParam;
|
---|
10 |
|
---|
11 | import java.security.Principal;
|
---|
12 |
|
---|
13 | @Controller
|
---|
14 | public class LoginController {
|
---|
15 |
|
---|
16 | @GetMapping(path = "/login")
|
---|
17 | public String getMapping(@RequestParam(value = "error", required = false) String error,
|
---|
18 | @ModelAttribute Stakeholder customer, Model model) {
|
---|
19 | return "login";
|
---|
20 | }
|
---|
21 |
|
---|
22 | @PostMapping(path = "/login")
|
---|
23 | public String loginCustomer(@ModelAttribute Stakeholder customer, Model model) {
|
---|
24 | return "redirect:login";
|
---|
25 | }
|
---|
26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.