Spring mvc 进来。

longforblossom 2010-08-10 03:23:08



@Controller
public class MyIndex extends MyAction
{
@RequestMapping(value = "/user/{uid}/index.action")
public String photo(@PathVariable
Long uid, Model model, HttpServletRequest request, HttpServletResponse response)
{
}
}



public class MyAction
{
public String execute(Model model, HttpServletRequest request, HttpServletResponse response)
{}
}


如何让 MyIndex 请求 发来是 先执行 父类MyAction 里的方法?
...全文
101 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
用super 啊
xxxshengxxx 2010-08-10
  • 打赏
  • 举报
回复
我也在做这个的时候遇到问题...解决不掉~
http://topic.csdn.net/u/20100810/15/a9406772-8bd7-4f46-b400-27322dab7b9f.html?69909
有时间帮我看下~ ~~ 今天最后一天了555555555
simaa0106 2010-08-10
  • 打赏
  • 举报
回复
在子类中可以直接使用父类的方法啊。所有的继承过来了。
xxxshengxxx 2010-08-10
  • 打赏
  • 举报
回复
你是做一套的增删改么?
liuyuhua0066 2010-08-10
  • 打赏
  • 举报
回复
我这有个很白痴的想法,请求先跳转到父类,在父类中再实现新的跳转,如跳到子类

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧