Whitelabel Error Page

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

一般这种提问不要直接截图。贴代码比较好。想帮你的人,直接可以复制你的代码。帮你调试。

看日志来说,你需要检查一下你的 ViewResolver。 你用的什么模版引擎?

用的是https://spring.io/guides/gs/serving-web-content/

我也不清楚是怎么回事。信息太少了,后端控制台有异常信息吗?

后端并没有异常信息