public class Crtl extends HttpServlet {
private static Log log = LogFactory.getLog(WacaiRemoteRequest.class);
private static ObjectMapper objectMapper = new ObjectMapper();
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=utf-8");
//这里需要接受调用者传过来的json参数
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
doGet(req, resp);
}
}
写一个接口给别人调用,我需要接收到调用者传过来的json然后转换为list,再去调用另一个接口返回结果,请问怎样接收json?