先说一声:
他能够访问到index.jsp
controller的代码:
@Controller
public class BlogController {
@Autowired
BlogService blogservice;
@RequestMapping(value = "list/{blogid}",method = RequestMethod.GET)
public Blog listBlog(@PathVariable("blogid") int blogid) {
System.out.println(blogservice.selectBlog(blogid));
return blogservice.selectBlog(blogid);
}
}
结果就是:
没指定Controller地址,list是BlogController的方法,应该在list前面加Blog