新人求指点,如何点击删除选中的链接,急~~(SpringMVC)
@Controller
@RequestMapping("/articles")
public class DeleteController {
@Autowired
private ArticleService articleService;
/**
* @RequestMapping(params = "actionMethod=delete", method = RequestMethod.POST)
public String delete(@RequestParam("id") final Long[] ids) {
List<GoodsBrand> brands = brandService.findDatasByIds(GoodsBrand.class,
ids);
if (brands != null && brands.size() > 0) {
brandService.deleteAll(brands);
}
return REDIRECTQUERYPATH;
}
* @return
*/
@RequestMapping(value="delete")
public String deleteService(@RequestParam("ID") final Integer ids) {
System.out.println("hello");
articleService.deleteService(ids);
return "redirect:/articles";
}
}