Added a testing endpoint for now.
This commit is contained in:
parent
4b3e304610
commit
7d6f10e3fc
|
@ -0,0 +1,17 @@
|
|||
package nl.andrewlalis.teaching_assistant_assistant.controllers;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@Controller
|
||||
public class TestController {
|
||||
|
||||
@GetMapping("/test")
|
||||
public String test (@RequestParam(name="name", required=false, defaultValue="World") String name, Model model) {
|
||||
model.addAttribute("name", name);
|
||||
return "test";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Teaching Assistant Assistant</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Hello world!</h1>
|
||||
<p>
|
||||
This is a testing homepage while the website is being built.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<title>Test Controller Page</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p th:text="'Hello, ' + ${name} + '!'"></p>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue