几种简单常用的springmvc的controller重定向方法
来源:互联网 发布:手机淘宝怎么没有彩票 编辑:程序博客网 时间:2024/06/04 20:53
几种简单常用的springmvc的controller重定向方法:
●controller返回的String
@RequestMapping("/actionname") public String showADLeaseListRequest() throws Exception { return "redirect:guojihua.action"; }
●controller返回ModelAndView
@RequestMapping("/actionname") public ModelAndView showADLeaseListRequest() throws Exception { // 返回ModelAndView ModelAndView modelAndView = new ModelAndView(); //方式1 //modelAndView.setView(new RedirectView("ShopingCart/shopingCartInitRequest.action"));// 根据需求更换 //方式2 modelAndView.setViewName("redirect:guojihua.action"); return modelAndView; }
这里只是简单的常用方式,具体复杂的可以看看这篇
我看了一篇挺好的
0 0
- 几种简单常用的springmvc的controller重定向方法
- springMVC controller间跳转 重定向 传递参数的方法
- springMVC controller间跳转 重定向 传递参数的方法
- JS重定向的几种方法
- springMVC的转发和重定向及Controller参数
- springmvc controller间重定向带参数跳转的解决方案
- SpringMVC转发与重定向的方法
- 使用SpringMVC时无参的重定向方法
- ASP.NET页面重定向 的几种方法比较
- asp.net 重定向的几种方法和性能
- ASP.NET 重定向的几种方法
- PHP获取重定向URL的几种方法
- python-3-print重定向输出的几种方法
- ASP.NET 重定向的几种方法小结
- Springmvc 在同一个controller和不同的controller中进行重定向redirect和转发forward:
- Springmvc 在同一个controller和不同的controller中进行重定向redirect和转发forward
- SpringMVC controller的几种形态
- springmvc重定向之后取值的几种办法以及优劣比较
- 控制IRQ和FIQ中断的编译器内部函数 - 基于Keil MDK
- 在防火墙中打开要用到的端口
- Swift-中介者模式(The Mediator Pattern)
- iOS :undefined symbols for architecture x86_64
- 关于OOM异常
- 几种简单常用的springmvc的controller重定向方法
- iOS开发中使用NSUserDefaults存储的对象变成null的解决办法
- 面试(三)ajax原理,oop理解
- android 7.0新特性,新功能,GMS4.0新特性
- Xcode 8问题集锦
- 设计模式中主要应用思想之我见
- Shader学习笔记(七)Unity Shader Rim示例
- Ubuntu下PHP5.6+MySQL+Apache+PHPStorm的安装和配置
- Android 仿美团网,探索使用ViewPager+GridView实现左右滑动查看更多分类的功能