mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-04-05 17:37:53 +08:00
解决不必要的黄线警告
This commit is contained in:
parent
0c0b08c6c3
commit
b62e2dae24
@ -18,12 +18,13 @@ import java.util.List;
|
||||
* sa 缓存处理
|
||||
*/
|
||||
@JbootSpi("sacache")
|
||||
@SuppressWarnings({"deprecation", "unchecked", "rawtypes"})
|
||||
public class SaRedisCache implements JbootCache {
|
||||
protected JbootRedisConfig config;
|
||||
protected JedisPool jedisPool;
|
||||
private ThreadLocal<String> CACHE_NAME_PREFIX_TL = new ThreadLocal<>();
|
||||
|
||||
public SaRedisCache(JbootRedisConfig config) {
|
||||
public SaRedisCache(JbootRedisConfig config) {
|
||||
this.config = config;
|
||||
|
||||
String host = config.getHost();
|
||||
@ -111,7 +112,7 @@ public class SaRedisCache implements JbootCache {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public <T> T get(String cacheName, Object key) {
|
||||
Jedis jedis = getJedis();
|
||||
try {
|
||||
|
@ -19,6 +19,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
/**
|
||||
* 使用Jboot的缓存方法存取Token数据
|
||||
*/
|
||||
@SuppressWarnings({"deprecation", "unchecked", "rawtypes"})
|
||||
public class SaTokenCacheDao implements SaTokenDao {
|
||||
|
||||
protected SaRedisCache saRedisCache;
|
||||
|
@ -35,8 +35,9 @@ public class AppRun extends JbootController {
|
||||
renderText("超级管理员方法!");
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public void token(String token) {
|
||||
Object t = Jboot.getRedis().get("xxxxx"); //默认redis库
|
||||
Object t = Jboot.getRedis().get("xxxxx"); //默认redis库
|
||||
SaSession saSession = StpUtil.getSessionByLoginId(StpUtil.getLoginIdByToken(token), false); //satoken redis库
|
||||
renderJson(saSession);
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ import com.pj.test.util.SoMap;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = StartUpApplication.class)
|
||||
@SuppressWarnings("deprecation")
|
||||
public class LoginControllerTest {
|
||||
|
||||
@Autowired
|
||||
|
Loading…
Reference in New Issue
Block a user