我是Spring和Java的新手。当我在eclipse ide中导入我的朋友Web项目时,它可以正常运行。但是,当我尝试创建新页面时,它说找不到(404错误)。我也编辑了控制器,但似乎无济于事。请帮忙。
我的控制器..
@Controller
public class laganController {
// For controlling pages
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String Index(HttpServletRequest request, Model model, HttpServletResponse response){
return "index";
}
@RequestMapping(value = "/signup", method = RequestMethod.GET)
public String Signup(HttpServletRequest request, Model model, HttpServletResponse response){
return "signup";
}
当我添加以下方法时,它不会重定向到该主页...但是上述代码可以正常运行。请帮助
@RequestMapping(value = "/home", method = RequestMethod.GET)
public String home(HttpServletRequest request, Model model, HttpServletResponse response){
return "home";
}