Procházet zdrojové kódy

api暂时不处理签名

叶君翔 před 3 roky
rodič
revize
b664a713ba

+ 8 - 8
lb-app/src/main/java/com/ydd/app/interceptor/AuthorizationInterceptor.java

@@ -80,14 +80,14 @@ public class AuthorizationInterceptor implements HandlerInterceptor {
     public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
         if (handler instanceof HandlerMethod) {
             log.info("========>ip: {}", IpUtils.getIpAddr(request));
-            if (!"dev".equals(envConfig.getProfiles())) {
-                String pathName = ((HandlerMethod) handler).getMethod().getDeclaringClass().getName();
-                NoSign noSign = ((HandlerMethod) handler).getMethod().getDeclaringClass().getDeclaredAnnotation(NoSign.class);
-                // 回调接口、加了NoSign注解的接口, 不需要验签
-                if (!pathName.contains(NO_SIGN_PACKAGE) && noSign == null && !this.handleSign(request, response)) {
-                    return false;
-                }
-            }
+//            if (!"dev".equals(envConfig.getProfiles())) {
+//                String pathName = ((HandlerMethod) handler).getMethod().getDeclaringClass().getName();
+//                NoSign noSign = ((HandlerMethod) handler).getMethod().getDeclaringClass().getDeclaredAnnotation(NoSign.class);
+//                // 回调接口、加了NoSign注解的接口, 不需要验签
+//                if (!pathName.contains(NO_SIGN_PACKAGE) && noSign == null && !this.handleSign(request, response)) {
+//                    return false;
+//                }
+//            }
             //获取客户端唯一识别号,用于推送消息
             String aliasId = StringUtils.isBlank(request.getParameter(ALIAS_ID_KEY)) ? request.getHeader(ALIAS_ID_KEY) : request.getParameter(ALIAS_ID_KEY);
             log.info("========>aliasId: {}", aliasId);