diff --git a/renren-api/src/main/java/io/renren/interceptor/AuthorizationInterceptor.java b/renren-api/src/main/java/io/renren/interceptor/AuthorizationInterceptor.java index 1c5c4b69..e9fd4266 100644 --- a/renren-api/src/main/java/io/renren/interceptor/AuthorizationInterceptor.java +++ b/renren-api/src/main/java/io/renren/interceptor/AuthorizationInterceptor.java @@ -6,6 +6,8 @@ import io.renren.common.exception.RenException; import io.renren.entity.TokenEntity; import io.renren.service.TokenService; import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.web.method.HandlerMethod; @@ -24,10 +26,12 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter { private TokenService tokenService; public static final String USER_KEY = "userId"; + public static final Logger LOGGER = LoggerFactory.getLogger(AuthorizationInterceptor.class); @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { Login annotation; + LOGGER.info("请求地址:{}", request.getRemoteAddr()); if(handler instanceof HandlerMethod) { annotation = ((HandlerMethod) handler).getMethodAnnotation(Login.class); }else{