`
java_frog
  • 浏览: 252173 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

MVCSimulateResourceImpl

 
阅读更多
/**
 * 
 */
package com.;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import GsonUtils;

/**
 * User: 
 * Date: 2014-12-18
 * Time: 下午4:12:08
 */
@Controller
public class MVCSimulateResourceImpl {

//	@RequestMapping(value="test",method=RequestMethod.POST,produces = "application/json; charset=UTF-8")  
//    @ResponseBody
//	@RequestBody TestVo testVo,   ,consumes="text/plain",produces="application/json"
//    public @ResponseBody String createStudent(HttpServletRequest request){
//		System.out.println("--------------");
//		String returnMsg ="";
////       System.out.println("name:"+testVo.getName());
////       System.out.println("tojson:"+GsonUtils.toJson(testVo));
//       System.out.println("sign:"+request.getParameter("sign"));
//       returnMsg = returnMsg+"sign:"+request.getParameter("sign");
//       BufferedReader reader = null;
//       String reqBase64 = "";
//       try {
//           reader = new BufferedReader(new InputStreamReader(request.getInputStream(), "UTF-8"));
//
//           String comId = "";
//           String line = "";
//           while ((line = reader.readLine()) != null) {
//               reqBase64 += line;
//           }
//           
//       }catch (Exception e) {
//		System.out.println("异常"+e);
//       }
//       System.out.println("request:"+reqBase64);
//       returnMsg = returnMsg + "request:"+reqBase64+"/n到此结束";
//       return returnMsg;
//    }


}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics