1、首先spring視圖解析配置如下:
訪問正常,可以返回success.jsp
@RequestMapping("test")
public String test(){
return SUCCESS;
}
可以進入controller方法內部,解析視圖錯誤404
@RequestMapping(value="testPath/{id}")
public String testPathV(@PathVariable String id){
logger.info("id=" + id);
return SUCCESS;
}
http://localhost:8080/blog/testPath/2
視圖解析設置如下都可以正常訪問:
*