Commit 3b5a7ee8 authored by yanzg's avatar yanzg

添加对Android的支持

parent 51d2352c
...@@ -21,19 +21,25 @@ public class TokenServiceCall implements TokenLoad { ...@@ -21,19 +21,25 @@ public class TokenServiceCall implements TokenLoad {
private TokenService tokenService = null; private TokenService tokenService = null;
private boolean initFlag = false; private int flagCount = 50;
public TokenServiceCall() { public TokenServiceCall() {
TokenHelper.setTokenLoad(this); TokenHelper.setTokenLoad(this);
} }
private void init() { private void init() {
if (tokenService != null) {
return;
}
if (flagCount < 1) {
return;
}
try { try {
tokenService = context.getBean(TokenService.class); tokenService = context.getBean(TokenService.class);
} catch (Exception ex) { } catch (Exception ex) {
Log.error(TokenServiceCall.class, "获取登录服务失败:" + ex.getMessage(), ex); Log.error(TokenServiceCall.class, "获取登录服务失败:" + ex.getMessage(), ex);
} finally { } finally {
initFlag = true; flagCount--;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment