mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-04-05 17:37:53 +08:00
fix: sa-token-redisx 中错误的 test 代码
This commit is contained in:
parent
e47fdd82d8
commit
b45ccba778
@ -2,7 +2,7 @@ package demo;
|
||||
|
||||
import cn.dev33.satoken.SaManager;
|
||||
import cn.dev33.satoken.dao.SaTokenDao;
|
||||
import cn.dev33.satoken.dao.SaTokenDaoOfRedis;
|
||||
import cn.dev33.satoken.dao.SaTokenDaoForRedisx;
|
||||
import org.noear.solon.annotation.Bean;
|
||||
import org.noear.solon.annotation.Configuration;
|
||||
import org.noear.solon.annotation.Inject;
|
||||
@ -13,14 +13,14 @@ import org.noear.solon.annotation.Inject;
|
||||
@Configuration
|
||||
public class Config {
|
||||
@Bean
|
||||
public void saTokenDaoInit(@Inject("${sa-token.redis}") SaTokenDaoOfRedis saTokenDao) {
|
||||
public void saTokenDaoInit(@Inject("${sa-token.redis}") SaTokenDaoForRedisx saTokenDao) {
|
||||
//手动操作,可适用于任何框架
|
||||
SaManager.setSaTokenDao(saTokenDao);
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
public SaTokenDao saTokenDaoInit2(@Inject("${sa-token.redis}") SaTokenDaoOfRedis saTokenDao) {
|
||||
public SaTokenDao saTokenDaoInit2(@Inject("${sa-token.redis}") SaTokenDaoForRedisx saTokenDao) {
|
||||
//Solon 项目,可用此案
|
||||
return saTokenDao;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ public class SaTokenPluginForSnack3 implements SaTokenPlugin {
|
||||
@Override
|
||||
public void install() {
|
||||
|
||||
// 设置JSON转换器:Fastjson 版
|
||||
// 设置JSON转换器:Snack3 版
|
||||
SaManager.setSaJsonTemplate(new SaJsonTemplateForSnack3());
|
||||
|
||||
// 重写 SaSession 生成策略
|
||||
|
Loading…
Reference in New Issue
Block a user