每当我尝试使用方法发布时,我都会收到405错误。 get方法正常工作。我尝试使用ajax更改类型。但它没有用。请帮忙
@Controller
public class PaymentController {
@Autowired
private IAccountService accountService;
@RequestMapping(value = "/payment", method = RequestMethod.POST)
public String returnAccountInformation(HttpSession session, Model model) {
String email = (String) session.getAttribute("email");
PlanInfo planInfo = getAccountService().getPlanInfo(email);
PlanInfoBean planInfoBean = new PlanInfoBean();
planInfoBean.setPlanName(planInfo.getPlanName());
planInfoBean.setPlanType(planInfo.getPlanType());
planInfoBean.setFeatures(planInfo.getFeatures());
model.addAttribute(IPaymentConstants.PLANINFO2, planInfoBean);
// System.out.println(session.getAttribute("email"));
return "AccountDetails";
}