| | |
| | | @Aspect
|
| | | @Order(2)
|
| | | public class SignValidateAspect {
|
| | | public static final String EDP = "execution(* com.yeshi.fanli.controller.client.v1.*.*(..))";
|
| | | public static final String EDP = "execution(* com.yeshi.fanli.controller.client.*.*.*(..))";
|
| | |
|
| | | public static String KEY = "";
|
| | |
|
| | |
| | |
|
| | | Object obj = null;
|
| | | try {
|
| | | long startTime = System.currentTimeMillis();
|
| | | obj = joinPoint.proceed(args);
|
| | | } catch (Throwable e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e, getHttpServletParams(request), request.getRequestURI().toString());
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | final long responseTime = System.currentTimeMillis() - startTime;
|
| | | // 记录大于2s的请求
|
| | | if (responseTime >= 2000) {
|
| | | ThreadUtil.run(new Runnable() {
|
| | |
|
| | | @Override
|
| | | public void run() {
|
| | | LogHelper.requestTime(url, params, responseTime);
|
| | | }
|
| | | });
|
| | |
|
| | | }
|
| | |
|
| | | } catch (Throwable e) {
|
| | | LogHelper.errorDetailInfo(e, getHttpServletParams(request), request.getRequestURI().toString());
|
| | | out.print(JsonUtil.loadFalseResult(90009, "服务器内部错误"));
|
| | | }
|
| | | return obj;
|
| | |
| | | while (its.hasNext()) {
|
| | | String key = its.next();
|
| | |
|
| | | if (key.equalsIgnoreCase("callback")) {
|
| | | fromWEB = true;
|
| | | }
|
| | | // if (key.equalsIgnoreCase("callback")) {
|
| | | // fromWEB = true;
|
| | | // }
|
| | |
|
| | | if (key.equalsIgnoreCase("sign") || key.equalsIgnoreCase("callback") || key.equalsIgnoreCase("_")) {
|
| | | continue;
|