注释
This commit is contained in:
@@ -139,7 +139,7 @@ public class CachedManagerService implements CachedManager, CachedActionFunc, Se
|
||||
* 检查name是否含特殊字符
|
||||
*
|
||||
* @param value 参数
|
||||
* @return
|
||||
* @return value
|
||||
*/
|
||||
protected String checkSchema(String value) {
|
||||
if (value != null && !value.isEmpty()) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import org.redkale.service.LoadMode;
|
||||
|
||||
/**
|
||||
* 定时任务标记,只能作用于Service的无参数或者单一ScheduleEvent参数的菲static方法上, 功能类似Spring里的Scheduled注解
|
||||
* 定时任务标记,只能作用于Service的无参数或者单一{@link org.redkale.scheduled.ScheduledEvent}参数的菲static方法上, 功能类似Spring里的Scheduled注解
|
||||
*
|
||||
* <p>详情见: https://redkale.org
|
||||
*
|
||||
|
||||
@@ -36,7 +36,13 @@ public final class ScheduledEvent {
|
||||
|
||||
public <T> T getJson(String name, Type type) {
|
||||
Object obj = get(name);
|
||||
return obj == null ? null : JsonConvert.root().convertFrom(type, obj.toString());
|
||||
if (obj == null) {
|
||||
return null;
|
||||
} else if (type instanceof Class && ((Class) type).isAssignableFrom(obj.getClass())) {
|
||||
return (T) obj;
|
||||
} else {
|
||||
return JsonConvert.root().convertFrom(type, obj.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public String getString(String name) {
|
||||
|
||||
Reference in New Issue
Block a user