This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue Sep 10 16:53:47 CST 2019
There was an unexpected error (type=Internal Server Error, status=500).
Circular view path [hello]: would dispatch back to the current handler URL [/hello] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
代码:
@Controller
public class HelloController {
@GetMapping("/hello")
public String hello(@RequestParam(name = “name”,required=false, defaultValue=“World”) String name , Model model){
model.addAttribute(“name”,name);
return “hello”;
}
}
模板引擎:
org.springframework.boot
spring-boot-starter-thymeleaf