Made a card homepage.
This commit is contained in:
@ -13,7 +13,7 @@ import java.util.ArrayList;
|
||||
|
||||
@Controller
|
||||
public class CardController {
|
||||
@GetMapping({"/card"})
|
||||
@GetMapping({"/card", "/"})
|
||||
public String hello(Model model) {
|
||||
ArrayList<Card> allCards = (new SQLDriver()).getAllCards();
|
||||
model.addAttribute("allcards", allCards);
|
||||
|
||||
@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@Controller
|
||||
public class HelloController {
|
||||
@GetMapping({"/", "/hello"})
|
||||
@GetMapping({"/hello"})
|
||||
public String hello(Model model, @RequestParam(value="name", required=false, defaultValue="World") String name) {
|
||||
model.addAttribute("name", name);
|
||||
return "hello";
|
||||
|
||||
Reference in New Issue
Block a user