//Spring MVC,,两个@RequestMapping是可以运行成功的,但是ViewControllers时候,就提示404错误,求解
@RequestMapping("/index")
public String hello() {
return "index";
}
@RequestMapping("/toUpload")
public String upLoad() {
return "upload";
}
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/index").setViewName("/index");
registry.addViewController("/toUpload").setViewName("/upload");
}