public class KoUtil extends Object
| 构造器和说明 |
|---|
KoUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
checkLogin(String token)
nothing to introduce for this, that everyone knows!
|
static void |
clearCaches() |
static MethodNode |
getCurrentMethodInfo()
get the current method
|
static DataSource |
getDataSource() |
static String |
getProperty(String propertyName) |
static boolean |
getPropertyAsBoolean(String propertyName) |
static double |
getPropertyAsDouble(String propertyName) |
static double |
getPropertyAsFloat(String propertyName) |
static int |
getPropertyAsInteger(String propertyName) |
static List<String> |
getPropertyAsList(String propertyName,
String split) |
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 |
recordException(Exception e)
record the exception to ko-time
|
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 |
setProperty(String propertyName,
String propertyValue) |
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)
throw 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 recordException(Exception e)
public static MethodNode getCurrentMethodInfo()
public static void clearCaches()
public static int getPropertyAsInteger(String propertyName)
public static double getPropertyAsDouble(String propertyName)
public static double getPropertyAsFloat(String propertyName)
public static boolean getPropertyAsBoolean(String propertyName)
Copyright © 2023. All rights reserved.