public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
response.setCharacterEncoding("utf-8");
String token ;
token=request.getHeader("token");
System.out.println("当前用户请求头为:"+token);
String requestURI = request.getRequestURI();
Enumeration<String> em = request.getParameterNames();
System.out.println("current request meth:"+requestURI);
boolean b = em.hasMoreElements();
if(b){
String name = em.nextElement();
String value = request.getParameter(name);
System.out.println("form表单请求的参数名称:"+name+"请求的参数值:"+value);
}
BufferedReader br = request.getReader();
String str, wholeStr = "";
while((str = br.readLine()) != null){
wholeStr += str;
}
System.out.println("body--Json中请求的参数名称:"+wholeStr);
}