Spring MVC 如何跳转项目以外的地址?
@RequestMapping(produces = "select")
private String getPid(ProductCatalogEntity bean, Model model,HttpServletResponse response) {
boolean pid = productCatalogService.getPid(bean, model);
if(pid){
//return "Info.jsp";
// return new ModelAndView("redirect:/http://192.168.1.115:8090/jeeshop/product/10321.html");
return "redirect:/http://192.168.1.115:8090/jeeshop/product/10321.html"; 要跳转的地址
}
return null;
}
试了很多方法都没解决 跳转的总是当前项目下的地址,求大神解决 还需要带参数跳转
private String getPid(ProductCatalogEntity bean, Model model,HttpServletResponse response) {
boolean pid = productCatalogService.getPid(bean, model);
if(pid){
//return "Info.jsp";
// return new ModelAndView("redirect:/http://192.168.1.115:8090/jeeshop/product/10321.html");
return "redirect:/http://192.168.1.115:8090/jeeshop/product/10321.html"; 要跳转的地址
}
return null;
}
试了很多方法都没解决 跳转的总是当前项目下的地址,求大神解决 还需要带参数跳转
...全文
相关推荐
Spring MVC点击链接,跳转到指定页面
在Spring MVC框架中,网页间的跳转是通过控制器(Controller)处理请求并返回视图(View)来实现的。
基于注解的Spring MVC入门实战小项目
Override:当找不到处理器时抛异常,方便定位 404 是哪来的。:开启异步支持,为Callable打好基础。还有 URL 映射也得讲究:映射值含义说明拦截所有请求(包括静态资源)⚠️ 需配合*.do仅拦截.do结尾的请求传统风格,利于区分动态请求/api/*仅拦截API路径前后端分离项目的标配建议 REST API 用/api/**,保留根路径给前端路由或静态资源,清晰明了!
Spring mvc结果跳转方法详解
Spring MVC 结果跳转方法详解Spring MVC 结果跳转方法是指在 Spring MVC 框架中,如何将请求结果跳转到指定的页面或执行特定的操作。
Spring Boot项目导出war包放到tomcat运行跳转到页面出现404报错
: /WEB-INF/views/ spring.mvc.view.suffix: .jsp ```4.
Spring 3.0 mvc 简单跳转 实例 源码
通过阅读这些源码,可以更深入地理解Spring MVC的运行机制和页面跳转流程。


Web 开发
