springmvc怎么跳转页面
1个回答
展开全部
public class BaseContoller{
public static final String COMMON_FAIL_PAGE = "fail_page";
public static final String COMMON_FAIL_ALERT = "fail_message";
public static final String USER_SESSION_KEY = "user_session";
// 处理JSP页面的直接访问
@RequestMapping("/{jsp}.do")
public String jsp(@PathVariable(value = "jsp") String jspStr) {
return jspStr;
}
}
之后让所有的Contoller类继承他就能直接访问jsp了
public static final String COMMON_FAIL_PAGE = "fail_page";
public static final String COMMON_FAIL_ALERT = "fail_message";
public static final String USER_SESSION_KEY = "user_session";
// 处理JSP页面的直接访问
@RequestMapping("/{jsp}.do")
public String jsp(@PathVariable(value = "jsp") String jspStr) {
return jspStr;
}
}
之后让所有的Contoller类继承他就能直接访问jsp了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询