Formulaire incription utilisateur
This commit is contained in:
@@ -5,6 +5,8 @@ import fr.eni.enchere.bo.User;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
@@ -22,4 +24,12 @@ public class InscriptionController {
|
||||
model.addAttribute("user", new User());
|
||||
return "inscription";
|
||||
}
|
||||
|
||||
@PostMapping("/newUser")
|
||||
public String setUser(@ModelAttribute User user) {
|
||||
System.out.println(user.getId());
|
||||
//userService.setUtilisateur(user);
|
||||
return "redirect:/accueil";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user