|
@@ -1,6 +1,7 @@
|
|
|
package com.steerinfo.dil.config;
|
|
package com.steerinfo.dil.config;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.steerinfo.dil.aspect.LogAspect;
|
|
import com.steerinfo.dil.aspect.LogAspect;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -28,7 +29,6 @@ public class RequestFilter implements Filter {
|
|
|
String url = httpRequest.getRequestURL().toString();
|
|
String url = httpRequest.getRequestURL().toString();
|
|
|
//获取参数,并校验
|
|
//获取参数,并校验
|
|
|
Cookie[] cookies = httpRequest.getCookies();
|
|
Cookie[] cookies = httpRequest.getCookies();
|
|
|
- log.info(cookies);
|
|
|
|
|
String userId = httpRequest.getHeader("userid");
|
|
String userId = httpRequest.getHeader("userid");
|
|
|
String userName = httpRequest.getHeader("username");
|
|
String userName = httpRequest.getHeader("username");
|
|
|
String orgCode = httpRequest.getHeader("orgcode");
|
|
String orgCode = httpRequest.getHeader("orgcode");
|
|
@@ -94,6 +94,7 @@ public class RequestFilter implements Filter {
|
|
|
params.put("dilCompanyList",dilCompanyListObject);
|
|
params.put("dilCompanyList",dilCompanyListObject);
|
|
|
params.put("rootCompanyMap",rootCompanyMapObject);
|
|
params.put("rootCompanyMap",rootCompanyMapObject);
|
|
|
params.put("accessToken",accessToken);
|
|
params.put("accessToken",accessToken);
|
|
|
|
|
+ log.info("params:"+params.toJSONString());
|
|
|
//将新的RequestBody写入新的请求对象保存
|
|
//将新的RequestBody写入新的请求对象保存
|
|
|
ServletRequest requestWrapper = new RequestWrapper(httpRequest, params.toJSONString());
|
|
ServletRequest requestWrapper = new RequestWrapper(httpRequest, params.toJSONString());
|
|
|
chain.doFilter(requestWrapper, response);
|
|
chain.doFilter(requestWrapper, response);
|
|
@@ -103,6 +104,7 @@ public class RequestFilter implements Filter {
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
log.info("过滤失败,使用原生请求处理!");
|
|
log.info("过滤失败,使用原生请求处理!");
|
|
|
|
|
+ log.info(e.getMessage());
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
chain.doFilter(request, response);
|
|
chain.doFilter(request, response);
|
|
|
}
|
|
}
|