|
|
@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
|
|
|
|
|
|
|
|
@Controller |
|
|
|
@Controller |
|
|
|
public class HelloController { |
|
|
|
public class HelloController { |
|
|
|
@GetMapping({"/", "/hello"}) |
|
|
|
@GetMapping({"/hello"}) |
|
|
|
public String hello(Model model, @RequestParam(value="name", required=false, defaultValue="World") String name) { |
|
|
|
public String hello(Model model, @RequestParam(value="name", required=false, defaultValue="World") String name) { |
|
|
|
model.addAttribute("name", name); |
|
|
|
model.addAttribute("name", name); |
|
|
|
return "hello"; |
|
|
|
return "hello"; |
|
|
|