我正在尝试做教程-> http://spring.io/guides/gs/serving-web-content/
当我运行它时,它显示 Circular View Path[greeting],为什么?
在本教程中,我不明白的一件事是以下内容及其工作原理:
return "greeting";
代码片段:
package hello;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@Controller
public class GreetingController {
@RequestMapping("/greeting")
public String greeting(@RequestParam(value="name", required=false, defaultValue="World") String name, Model model) {
model.addAttribute("name", name);
return "greeting";
}
}