...
|
...
|
@@ -6,6 +6,8 @@ import com.ui.model.BaseResponse; |
|
|
import com.ui.model.req.AuthModule;
|
|
|
import com.ui.model.req.User;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.core.ParameterizedTypeReference;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
...
|
...
|
@@ -22,6 +24,7 @@ import java.util.concurrent.ConcurrentHashMap; |
|
|
@Component
|
|
|
@EnableAsync
|
|
|
public class UserAuthLocal {
|
|
|
Logger log = LoggerFactory.getLogger(UserAuthLocal.class);
|
|
|
|
|
|
private static ConcurrentHashMap<String, User> usermap = new ConcurrentHashMap<>();
|
|
|
|
...
|
...
|
@@ -35,7 +38,7 @@ public class UserAuthLocal { |
|
|
|
|
|
//@PostConstruct
|
|
|
public synchronized void init() {
|
|
|
|
|
|
try{
|
|
|
//加载用户信息
|
|
|
BaseResponse<List<User>> response = httpRestClient.exchangeForget(HttpUriContants.GET_All_USER, new ParameterizedTypeReference<BaseResponse<List<User>>>() {
|
|
|
}, null);
|
...
|
...
|
@@ -66,6 +69,9 @@ public class UserAuthLocal { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
log.error(" - UserAuthLocal - init - error", e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|