struts2中的多个action可以写到一个类吗
1个回答
展开全部
可以用,用method 指定就好了
@Action(value = "findAllAction" ,results = {@Result(name = "success" , location = "list.jsp")})
public String findAll(){
List<Customer> list = customerService.findAll();
session.put("list", list);
return SUCCESS;
}
@Action(value = "findAllAction" ,results = {@Result(name = "success" , location = "list.jsp")})
public String findAll(){
List<Customer> list = customerService.findAll();
session.put("list", list);
return SUCCESS;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询