Last change
on this file since cc52b09 was 763289e, checked in by Gjoko <goko_kostadinov@…>, 20 months ago |
Fix security
|
-
Property mode
set to
100644
|
File size:
732 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;
|
---|
[204464d] | 9 |
|
---|
| 10 | @Controller
|
---|
| 11 | public class LoginController {
|
---|
| 12 |
|
---|
[763289e] | 13 | @GetMapping(path = "/login")
|
---|
[204464d] | 14 | public String getMapping(Model model) {
|
---|
[763289e] | 15 | model.addAttribute("stakeholder", new Stakeholder());
|
---|
[204464d] | 16 | return "login";
|
---|
| 17 | }
|
---|
[763289e] | 18 |
|
---|
| 19 | @PostMapping(path = "/login")
|
---|
| 20 | public String loginCustomer(@ModelAttribute Stakeholder customer, Model model) {
|
---|
| 21 | return "redirect:homepage";
|
---|
| 22 | }
|
---|
[204464d] | 23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.