在Spring + google应用引擎中使用POST方法时出现405错误

时间:2014-07-30 11:52:35

标签: spring google-app-engine post get

每当我尝试使用方法发布时,我都会收到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";
    }

0 个答案:

没有答案