- Timestamp:
- 10/31/22 23:42:15 (20 months ago)
- Branches:
- master
- Children:
- 044bd76
- Parents:
- 204464d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/edu/gjoko/schedlr/controllers/LoginController.java
r204464d r763289e 1 1 package edu.gjoko.schedlr.controllers; 2 2 3 import edu.gjoko.schedlr.entity.Stakeholder; 3 4 import org.springframework.stereotype.Controller; 4 5 import org.springframework.ui.Model; 5 6 import org.springframework.web.bind.annotation.GetMapping; 7 import org.springframework.web.bind.annotation.ModelAttribute; 8 import org.springframework.web.bind.annotation.PostMapping; 6 9 7 10 @Controller 8 11 public class LoginController { 9 12 10 @GetMapping( value= "/login")13 @GetMapping(path = "/login") 11 14 public String getMapping(Model model) { 15 model.addAttribute("stakeholder", new Stakeholder()); 12 16 return "login"; 13 17 } 18 19 @PostMapping(path = "/login") 20 public String loginCustomer(@ModelAttribute Stakeholder customer, Model model) { 21 return "redirect:homepage"; 22 } 14 23 }
Note:
See TracChangeset
for help on using the changeset viewer.