Merge branch 'refs/heads/marvin'
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
package fr.eni.enchere.controllers;
|
||||
|
||||
import fr.eni.enchere.bll.ArticleService;
|
||||
import fr.eni.enchere.bo.Article;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
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.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Controller
|
||||
@@ -16,6 +22,7 @@ public class AccueilController {
|
||||
|
||||
public AccueilController(ArticleService articleService) {
|
||||
super();
|
||||
|
||||
this.articleService = articleService;
|
||||
}
|
||||
|
||||
@@ -25,6 +32,12 @@ public class AccueilController {
|
||||
return "accueil";
|
||||
}
|
||||
|
||||
@PostMapping("/searchArticle")
|
||||
public String searchArticle(@ModelAttribute String title, Model model) {
|
||||
model.addAttribute("Articles", articleService.findArticleByTitle(title));
|
||||
return "accueil";
|
||||
}
|
||||
|
||||
@GetMapping("/login")
|
||||
public String login(Model modele) {
|
||||
return "login";
|
||||
|
||||
Reference in New Issue
Block a user