Authored by fangyeqing

FIX:

1 package com.xkl.authorization.interceptor; 1 package com.xkl.authorization.interceptor;
2 2
3 import com.xkl.authorization.annotation.Authorization; 3 import com.xkl.authorization.annotation.Authorization;
  4 +import com.xkl.authorization.manager.ITokenManager;
4 import com.xkl.authorization.model.TokenModel; 5 import com.xkl.authorization.model.TokenModel;
5 -import com.xkl.authorization.manager.TokenManager;  
6 import com.xkl.config.Constants; 6 import com.xkl.config.Constants;
7 import org.springframework.beans.factory.annotation.Autowired; 7 import org.springframework.beans.factory.annotation.Autowired;
8 import org.springframework.stereotype.Component; 8 import org.springframework.stereotype.Component;
@@ -21,7 +21,7 @@ import java.lang.reflect.Method; @@ -21,7 +21,7 @@ import java.lang.reflect.Method;
21 public class AuthorizationInterceptor extends HandlerInterceptorAdapter { 21 public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
22 22
23 @Autowired 23 @Autowired
24 - private TokenManager manager; 24 + private ITokenManager manager;
25 25
26 public boolean preHandle(HttpServletRequest request, 26 public boolean preHandle(HttpServletRequest request,
27 HttpServletResponse response, Object handler) throws Exception { 27 HttpServletResponse response, Object handler) throws Exception {
1 package com.xkl.authorization.manager.impl; 1 package com.xkl.authorization.manager.impl;
2 2
3 -import com.xkl.authorization.manager.TokenManager; 3 +import com.xkl.authorization.manager.ITokenManager;
4 import com.xkl.authorization.model.TokenModel; 4 import com.xkl.authorization.model.TokenModel;
5 import com.xkl.config.Constants; 5 import com.xkl.config.Constants;
6 import org.springframework.beans.factory.annotation.Autowired; 6 import org.springframework.beans.factory.annotation.Autowired;
@@ -13,10 +13,10 @@ import java.util.concurrent.TimeUnit; @@ -13,10 +13,10 @@ import java.util.concurrent.TimeUnit;
13 13
14 /** 14 /**
15 * 通过Redis存储和验证token的实现类 15 * 通过Redis存储和验证token的实现类
16 - * @see com.xkl.authorization.manager.TokenManager 16 + * @see com.xkl.authorization.manager.ITokenManager
17 */ 17 */
18 @Component 18 @Component
19 -public class RedisTokenManager implements TokenManager { 19 +public class RedisTokenManager implements ITokenManager {
20 20
21 private RedisTemplate<Long, String> redis; 21 private RedisTemplate<Long, String> redis;
22 22