public class UserInfoInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(final HttpServletRequest request, final HttpServletResponse response, final Object handler) throws Exception {
String userId = request.getHeader("User-info");
if(StrUtil.isNotEmpty(userId)){
UserContext.setUser(Long.parseLong(userId));
}
return true;
}
@Override
public void afterCompletion(final HttpServletRequest request, final HttpServletResponse response, final Object handler, final Exception ex) throws Exception {