相关文章推荐
腹黑的松鼠  ·  php ...·  2 月前    · 
星星上的麻辣香锅  ·  Django ...·  3 月前    · 

JAVA 后台重定向跨域发送post请求

如例子:

@RequestMapping(value = "test.do", method = RequestMethod.POST)
public void Test(HttpServletRequest request, HttpServletResponse response) {
    Map<String, String[]> mPara = request.getParameterMap();
    String sPara = "";
if(mPara != null){
for (String sKey: mPara.keySet()) {
if(sPara.equals("")){
                sPara += sKey + "=" + mPara.get(sKey)[0];
            }else {
                sPara += "&" + sKey + "=" + mPara.get(sKey)[0];