我的控制器中有以下两种方法具有相同的URI:
@RequestMapping(value = "/member/createCompany/addParams", method = RequestMethod.POST)
public String setCompanyParams(
@ModelAttribute @Valid CampaignBeanDto campaignBeanDto, BindingResult bindingResult,
@RequestParam(value = "g-recaptcha-response") String recapchaResponse,
HttpSession session, Principal principal, Model model) throws Exception {
return "forward:/member/createCompany/addParams";
}
@RequestMapping(value = "/member/createCompany/addParams", method = RequestMethod.GET)
public String createCompanyAddParams(Principal principal, Model model, HttpSession session) {
return "member/createCompany/addParams";
}
我从前端调用get POST方法,然后循环并再次调用POST方法。
如何重写前进以调用GET方法?