public class KoUtil extends Object
| 构造器和说明 |
|---|
KoUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
checkLogin(String token)
nothing to introduce for this, that everyone knows!
|
static void |
clearCaches() |
static DataSource |
getDataSource() |
static org.springframework.data.redis.core.StringRedisTemplate |
getStringRedisTemplate() |
static boolean |
isLogin(String token)
nothing to introduce for this, that everyone knows!
|
static String |
login(String userName)
nothing to introduce for this, that everyone knows!
|
static void |
setDataSource(DataSource dataSource)
set a Datasource for saving of ko-time data
note: this Datasource will not affect project's datasource
|
static void |
setStringRedisTemplate(org.springframework.data.redis.core.RedisTemplate redisTemplate)
set a RedisTemplate for saving of ko-time data
note: you can choose one between setRedisTemplate and setJedisPool to save data
|
static void |
throwException(Exception e)
record the exception to ko-time
this method will throw an exception named RecordException,and RunTimeHandler will receive it so that it can be record by ko-time
|
public static String login(String userName)
public static void checkLogin(String token)
public static boolean isLogin(String token)
public static void setDataSource(DataSource dataSource)
public static DataSource getDataSource()
public static void setStringRedisTemplate(org.springframework.data.redis.core.RedisTemplate redisTemplate)
public static org.springframework.data.redis.core.StringRedisTemplate getStringRedisTemplate()
public static void throwException(Exception e)
public static void clearCaches()
Copyright © 2022. All rights reserved.